Conway's game of life, implemented in a functional manner using Scala