A word on idiomatic Haskell Most of the Haskell in this article is not idiomatic. For examples, data constructors take tuples instead of expanding the components into fields. I took this route to keep the code as aesthetically close to the underlying formal mathematics as possible. The setting: State machines Before we implement an interpreter as a CEK machine, let's look at state machines in gene