A computation with an additional implicit state value that can be read and set.
Automates the threading through of immutable accumulator values etc.
Implements monnit.core/Functor
and monnit.core/Monad
.
A computation with an additional implicit state value that can be read and set. Automates the threading through of immutable accumulator values etc. Implements [[monnit.core/Functor]] and [[monnit.core/Monad]].
(eval s sm)
Like run
, but discards the final state and returns only the result value.
Like [[run]], but discards the final state and returns only the result value.
(exec s sm)
Like run
, but discards the result value and returns only the final state.
Like [[run]], but discards the result value and returns only the final state.
A State
computation that gets the state.
A [[State]] computation that gets the state.
A State
computation that just wraps a value.
A [[State]] computation that just wraps a value.
(run s sm)
Run a State
computation sm
with s
as the initial value of the state.
Returns a [[monnit.pair.Pair]] with the final state as monnit.pair/fst
and the result value as [[monnit.pait/snd]].
Run a [[State]] computation `sm` with `s` as the initial value of the state. Returns a [[monnit.pair.Pair]] with the final state as [[monnit.pair/fst]] and the result value as [[monnit.pait/snd]].
(set s*)
Make a State
computation that sets the state to s*
.
Make a [[State]] computation that sets the state to `s*`.
A State
computation that sets the state.
A [[State]] computation that sets the state.
A computation with an additional implicit state value that can be read and set.
Automates the threading through of immutable accumulator values etc.
Implements monnit.core/Functor
and monnit.core/Monad
.
A computation with an additional implicit state value that can be read and set. Automates the threading through of immutable accumulator values etc. Implements [[monnit.core/Functor]] and [[monnit.core/Monad]].
(state? self)
Is self
a State
computation?
Is `self` a [[State]] computation?
(update f)
Make a State
computation that updates the state with f
.
Make a [[State]] computation that updates the state with `f`.
A State
computation that updates the state with a function.
A [[State]] computation that updates the state with a function.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close