Add memoization example