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.
(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)))
Comments top
No comments for fetch-val. Log in to add a comment.