Loading homepage
Implement a memoized version of a single-argument function. Repeated calls with the same argument reuse the previous result.
Input: const double = memoize((n) => n * 2); double(3); double(3); Output: 6, 6; the original function runs once.
Use the documented contract in both JS and TS.