Permalink
Browse files

Refactor invoke

  • Loading branch information...
1 parent 8e0f262 commit c9f9a122737645d3cee7b359ecf2dc4f569180f8 Jim Duey committed Oct 3, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/clojure/clojure/core/logic.clj
@@ -1855,9 +1855,9 @@
(deftype logic-monad [v mv goal]
clojure.lang.IFn
(invoke [_ c]
- (cond
- goal (mv (fn [v] ((goal v) c)))
- :else (c v)))
+ (if-not goal
+ (c v)
+ (mv (fn [v] ((goal v) c)))))
m/Monad
(do-result [_ v]

0 comments on commit c9f9a12

Please sign in to comment.