Functions that memoize calls and locally memoizing existing functions.