Sobes.tech
Middle+

Implement a function memo(fn, lifetime) that returns a new function and caches the result of the original function without arguments for a specified lifetime in milliseconds. It should cache only the last result, without keys and Map; a repeated call within the lifetime should return the cached result.