Elisp memoization functions