This is a generic memoization function
This implementation uses a cache independent of the function being memoized to allow old values to be garbage collected when the memoized function goes out of scope.
The function object to memoize
This is a generic memoization function
This implementation uses a cache independent of the function being memoized to allow old values to be garbage collected when the memoized function goes out of scope.