Implement `memoize(fn)` that returns a function caching results by argument list, so the underlying `fn` runs at most once per distinct set of arguments. Repeated calls with the same arguments return the cached value without re-invoking `fn`.
+ 2 hidden tests run on Submit.
A closure holds a Map keyed by a serialized form of the arguments. On a cache hit the stored value is returned immediately; on a miss the function runs once and its result is recorded. This trades memory for speed on pure, repeatedly-called functions.
Run your code to see results.