std.effect.state
Implementation of the State
effect
Types
The State
effect provides an updatable state
Values
Retreive the current value.
Retreive the current value and applied f
to it.
Store s
as the new value of the state.
Update the state by applying f
.
Eliminate the State
effect and return the state and the computed value
let exec_state s eff : forall a r . forall s . s -> Eff [| state : State s | r |] a -> Eff [| | r |] s
Eliminate the State
effect and return the state
let eval_state s eff : forall a r . forall s . s -> Eff [| state : State s | r |] a -> Eff [| | r |] a
Eliminate the State
effect and return the computed value