Liking cljdoc? Tell your friends :D

state-flow.state


ensure-stepclj

(ensure-step value)

Internal use only.

Given a state-flow step, returns value as/is, else wraps value in a state-flow step.

Internal use only.

Given a state-flow step, returns value as/is, else wraps value in a state-flow step.
sourceraw docstring

error-contextclj

Same as state monad context, but short circuits if error happens, place error in return value

Same as state monad context, but short circuits if error happens, place error in return value
sourceraw docstring

error-stateclj

(error-state mfn)
source

evalclj

source

execclj

source

getclj

(get)

Returns the equivalent of (fn [state] [state, state])

Returns the equivalent of (fn [state] [state, state])
sourceraw docstring

getsclj

(gets f & args)
source

modifyclj

(modify f & args)

Returns the equivalent of (fn [state] [state, (apply swap! state f args)])

Returns the equivalent of (fn [state] [state, (apply swap! state f args)])
sourceraw docstring

putclj

(put new-state)

Returns the equivalent of (fn [state] [state, new-state])

Returns the equivalent of (fn [state] [state, new-state])
sourceraw docstring

returnclj

(return v)

Returns the equivalent of (fn [state] [v, state])

Returns the equivalent of (fn [state] [v, state])
sourceraw docstring

runclj

source

state?clj

source

swapcljdeprecated

(swap f)

DEPRECATED: use modify

DEPRECATED: use modify
sourceraw docstring

wrap-fnclj

(wrap-fn my-fn)

Wraps a (possibly side-effecting) function to a state monad

Wraps a (possibly side-effecting) function to a state monad
sourceraw docstring

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

× close