1.2.0 permalink Arrow_down_16x16
  • (fetch-val key)
Return a state-monad function that assumes the state to be a map and
returns the value corresponding to the given key. The state is not modified.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/monads.clj:365 top

(defn fetch-val
  "Return a state-monad function that assumes the state to be a map and
   returns the value corresponding to the given key. The state is not modified."
  [key]
  (domonad state-m
    [s (fetch-state)]
    (key s)))
Vars in clojure.contrib.monads/fetch-val: defn key
Used in 0 other vars

Comments top

No comments for fetch-val. Log in to add a comment.