Memoize

Implement a caching wrapper that stores function results based on arguments. Subsequent calls with same arguments return cached result.

Examples
Input: [null,5]
Output: 10
Hints

Memoize

Implement a function that caches results of function calls based on arguments.