Game of life using only functions.