Some notes on memoization