Add memoization to scm/gameoflife.scm to improve performance