Course · Section 10: A Closer Look at Functions · Lecture 139: Functions Returning Functions
Implement `memoize(fn)` returning a function that caches results by arguments, so `fn` runs only once per distinct argument list.
+ 1 hidden test run on Submit.
A closure-held Map keyed by the stringified arguments caches results, so the wrapped function runs once per distinct input.
Run your code to see results.