Permalink
Browse files

Improved fetch-val

  • Loading branch information...
1 parent dd3832c commit 90909e30965bb59fccc8e527d31f8aaabc9d404b @khinsen khinsen committed Sep 10, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/main/clojure/clojure/algo/monads.clj
@@ -425,9 +425,7 @@
"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)))
+ (fn [s] [(get s key ) s]))
(defn update-val
"Return a state-monad function that assumes the state to be a map and

0 comments on commit 90909e3

Please sign in to comment.