Add memoLastCall
function
#271
aleclarson
started this conversation in
Ideas
Replies: 2 comments
-
Let me tell you, at work, I've had to write this manually to solve some problems. I would love to see this function in Radashi, along with a version compatible with Promises. Probably |
Beta Was this translation helpful? Give feedback.
0 replies
-
Moved to Stage 1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This function creates a memoized version of a function that caches only its most recent call. When the function is called with the same arguments as the previous call, it returns the cached result instead of recalculating. This is useful for optimizing expensive calculations when only the latest result needs to be cached, making it more memory-efficient than traditional memoization.
Example usage
Proposed implementation
Naming
Suggestions for alternative naming are welcome.
Beta Was this translation helpful? Give feedback.
All reactions