memoize

Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input