Implementierung:
data State s a = State ( s -> ( s, a )) instance Monad ( State s ) where ...
Benutzung:
import Control.Monad.State tick :: State Integer () tick = do c <- get ; put $ c + 1 evalState ( do tick ; tick ; get ) 0