☰
state
state
§state(T type, S type, val state.T, get state.S, r effect_mode.val) => state state.T state.S:oneway_monad state.T, state state.T state.S
§state(T
type
, S type
, val state.T, get state.S, r effect_mode.val) =>
state state.T state.S:
oneway_monad state.T, state state.T state.SFunctions
converts option to a string
returns the result of $T for an option containing an instance
of T, alternatively returns $nil for an option that is nil.
returns the result of $T for an option containing an instance
of T, alternatively returns $nil for an option that is nil.
set state to new, leaving the contents unchanged
map this using f
return function
monadic operator
monadic operator
Same as non-generic >>=, but also maps to a different type B.
Same as non-generic >>=, but also maps to a different type B.
modify the state, leaving the contents unchanged
this can be used both as plain or as a oneway monad to store a state
in a way orthogonal to the actual computation.