Memoizes a function, caching the result of the last call.
If the function is called with the same arguments (and the same context!) again, it will return the cached result.
It caches only the last call, so it's not suitable for functions that are called with different arguments in a short
time.
Warning: Your function must be 100% pure, and it can't access anything dynamic outside its scope.
Memoizes a function, caching the result of the last call. If the function is called with the same arguments (and the same context!) again, it will return the cached result.
It caches only the last call, so it's not suitable for functions that are called with different arguments in a short time.
Warning: Your function must be 100% pure, and it can't access anything dynamic outside its scope.