This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Python Coding Question: Memoize Function Using Closure | |
| ====================================================== | |
| You are given a function. Write another function called `memoize` that can wrap | |
| any function and cache its result. | |
| If the wrapped function is called again with the same input, it should return | |
| the cached result instead of executing the original function again. |