In this post I will implement a state machine using recursion and continuation functions. These two concepts enables us to implement a state machine with a dynamic recursive API that hides any data associated with states while enforcing the client to perform only valid transitions between the states. » In functional programming we strive to write side-effect free applications. In other words, all