Liking cljdoc? Tell your friends :D

monnit.state

A computation with an additional implicit state value that can be read and set. Automates the threading through of immutable accumulator values etc.

A computation with an additional implicit state value that can be read and set.
Automates the threading through of immutable accumulator values etc.
raw docstring

Bindcljs

source

evalclj/s

(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.
sourceraw docstring

execclj/s

(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.
sourceraw docstring

FMap1cljs

source

FMap2cljs

source

FMap3cljs

source

FMap4cljs

source

FMapNcljs

source

Getcljs

A State computation that gets the state.

A [[State]] computation that gets the state.
sourceraw docstring

getclj/s

A State computation that gets the state. An instance of Get.

A [[State]] computation that gets the state. An instance of [[Get]].
sourceraw docstring

pureclj/s

(pure v)

Wrap v into a State.

Wrap `v` into a [[State]].
sourceraw docstring

Purecljs

A State computation that just wraps a value.

A [[State]] computation that just wraps a value.
sourceraw docstring

runclj/s

(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]].
sourceraw docstring

setclj/s

(set s*)

Make a State computation that sets the state to s*.

Make a [[State]] computation that sets the state to `s*`.
sourceraw docstring

Setcljs

A State computation that sets the state.

A [[State]] computation that sets the state.
sourceraw docstring

Stateclj/sprotocol

A computation with an additional implicit state value that can be read and set. Automates the threading through of immutable accumulator values etc.

A computation with an additional implicit state value that can be read and set.
Automates the threading through of immutable accumulator values etc.

-run-stateclj/s

(-run-state self s)

run with the State first. An implementation detail; call run instead.

[[run]] with the [[State]] first. An implementation detail; call [[run]]
instead.

state?clj/s

(state? self)

Is self a State computation?

Is `self` a [[State]] computation?
sourceraw docstring

updateclj/s

(update f)

Make a State computation that updates the state with f.

Make a [[State]] computation that updates the state with `f`.
sourceraw docstring

Updatecljs

A State computation that updates the state with a function.

A [[State]] computation that updates the state with a function.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close