[Haskell] Simple variable-state `monad'