Module State

module State: sig .. end

State monad


include Monad.S2
val run : ('s, 'a) t -> 's -> 's * 'a
val state : ('s -> 's * 'a) -> ('s, 'a) t
val get : ('s, 's) t
val gets : ('s -> 'a) -> ('s, 'a) t
val put : 's -> ('s, unit) t
val modify : ('s -> 's) -> ('s, unit) t