Parameterised monad interface, and a parameterised state monad.