Stateful computations as a monad. An example for object-oriented programmers. This article is an instalment in an article series about monads. A previous article described the State functor. As is the case with many (but not all) functors, this one also forms a monad. This article continues where the State functor article stopped.