A simple memoization function that stores the results of expensive function calls and reuses those results when the same inputs occur again. This technique greatly speeds up the computation of fedirt function by caching previously computed values.
Usage
mem(f)
Value
Returns a memd version of function f that will cache its previously computed results for faster subsequent evaluations, especially beneficial when applied to fedirt.