Wrapper has the same interface as the wrapped function#14
Wrapper has the same interface as the wrapped function#14jimhester merged 2 commits intor-lib:masterfrom krlmlr:12-interface
Conversation
|
Now complete, including revdep-check. If the memoized function is not yet defined during memoization, its formals cannot be queried, and the old implementation is used (with a warning). Ironically, the package that pointed me at that issue -- lubridate -- doesn't use memoise anymore. (It still fails, but this is due to locale settings on my machine.) The individual merges (excluding trivial ones, oldest first) provide additional detail. |
R/memoise.r
Outdated
There was a problem hiding this comment.
Is there a reason you don't want to use exists here?
There was a problem hiding this comment.
I think exists() won't work with anonymous functions.
Incorporate review notes
|
Thanks for the review, I have addressed all remarks. The most recent changes are https://github.com/krlmlr/memoise/pull/16/files. |
|
Just updated the revdep check. Hope there won't be too many conflicts with @jimhester's pull requests. |
|
Thanks Kirill, this makes the interface much nicer! |
Also, the wrapped function is referred to by
memoised_function, which is clearer thanf.Cc @maxheld83 and @piccolbo.
Fixes #12.
Fixes #6.
Closes #7 (=supersedes it).
Closes #2 (=includes it).
Closes #13 (=includes it).
Example: