Pairs
intermediateHow do you bundle two values together when you only have functions?
A function can remember values. You’ve seen that with closures. If a function can remember one value, it can remember two. The question is how to get them back out.
In four steps, you’ll discover that a function can serve as a data structure. Not by using any special language feature, but simply by closing over values and choosing between them.