Improving the game of life code to make better use of optionals