has to somehow know the current state for these called functions. The
only way to do this, is to put these \emph{substates} inside the
caller's state. This means that a function's state is the sum of the
- states of all functions it calls, and its own state.
+ states of all functions it calls, and its own state. This sum
+ can be obtained using something simple like a tuple, or possibly
+ custom algebraic types for clarity.
This also means that the type of a function (at least the "state"
part) is dependent on its own implementation and of the functions it