This is a page from my book, Functional Programming, Simplified
“In theory, theory and practice are the same. In practice, they’re not.”
Now that I’ve given you a little background about what I think “state” is, let’s build a simple game that requires us to use state. I’ll build the game using recursion, and also immutable state — something I had never heard of when I first starting writing the Scala Cookbook.