Skip to content

Conversation

@richierocks
Copy link
Contributor

The help documentation cautions about calling memoise on functions that have already been memoised, since it will reset the cache. It seems sensible to have a warning built-in to the function to notify the user when they are doing this.

memoi[sz]e now warns if the input function has already been memoised.
jimhester pushed a commit that referenced this pull request Jan 19, 2016
is.memoised returns FALSE for non-functions
@jimhester
Copy link
Member

I wonder if it would be best to just signal an error if the function is already memoised...

@jimhester jimhester merged commit c190dc1 into r-lib:master Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants