Machine.State
An interface to the state.
An interface gives an access to operations that query and modify machine state.
type 'a m
type 'a t
val get : 'a t -> 'a m
get state extracts the state.
get state
val put : 'a t -> 'a -> unit m
put state x saves a machine state
put state x
val update : 'a t -> f:('a -> 'a) -> unit m
update state ~f updates a state using function f.
update state ~f
f