Complete the memoization grammar examples