Liking cljdoc? Tell your friends :D

state-flow.state


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

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)
source

modifyclj

(modify f)

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

Returns the equivalent of (fn [state] [state, (swap! state f)])
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