Hide playlist

    Construct a Stateful Monad

    We define the State datatype and take a peek into its inner working. By manually constructing an instance, we’ll start to get a feel on how the type separates state management from our stateful computations. As State depends on a Pair type, we get to know how each portion can be extracted through the fst and snd Pair instance methods.

    Please take a moment to tell your friends:

    You must be a PRO Member to view code