December 2019
Intermediate to advanced
248 pages
5h 34m
English
In functional programming, data structures are inextricably linked to functions. Building good programs means considering how those programs use the data. Some data structures are primarily read-only and others exist to be updated. As you saw in the previous chapter, some datatypes are easier to update than others.
Let’s take a very simple programming problem, representing a tic-tac-toe game. For those rare folks who have never played this game, it’s a childhood favorite where two players, denoted by “X” and “O”, take turns putting their markers on a 3x3 grid. The game ends when the first player gets three in a row.
Since it’s a small game, performance isn’t really a concern. Even when full, our biggest ...
Read now
Unlock full access