diff options
author | Stuart Halloway <stu@thinkrelevance.com> | 2009-06-24 00:01:11 -0400 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2009-06-24 00:01:11 -0400 |
commit | 0930bfdf3361f76d773149b5bd7170c435fe5f20 (patch) | |
tree | 8445bed1696c397a1e56f3e50f8f356ba3869dd6 /src/clojure/contrib/test_contrib/monads.clj | |
parent | 85c4905b3ccb94dfdb2272e92de6ba1051e304e3 (diff) |
gtic: updated contrib tests to use new template syntax
Diffstat (limited to 'src/clojure/contrib/test_contrib/monads.clj')
-rw-r--r-- | src/clojure/contrib/test_contrib/monads.clj | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clojure/contrib/test_contrib/monads.clj b/src/clojure/contrib/test_contrib/monads.clj index 5d38b544..a09d646d 100644 --- a/src/clojure/contrib/test_contrib/monads.clj +++ b/src/clojure/contrib/test_contrib/monads.clj @@ -19,7 +19,7 @@ (deftest sequence-monad (with-monad sequence-m - (are (= _1 _2) + (are [a b] (= a b) (domonad [x (range 3) y (range 2)] (+ x y)) '(0 1 1 2 2 3) (domonad [x (range 5) y (range (+ 1 x)) :when (= (+ x y) 2)] (list x y)) @@ -37,7 +37,7 @@ (with-monad maybe-m (let [m+ (m-lift 2 +) mdiv (fn [x y] (domonad [a x b y :when (not (zero? b))] (/ a b)))] - (are (= _1 _2) + (are [a b] (= a b) (m+ (m-result 1) (m-result 3)) (m-result 4) (mdiv (m-result 1) (m-result 3)) @@ -50,7 +50,7 @@ (deftest seq-maybe-monad (with-monad (maybe-t sequence-m) (letfn [(pairs [xs] ((m-lift 2 #(list %1 %2)) xs xs))] - (are (= _1 _2) + (are [a b] (= a b) ((m-lift 1 inc) (for [n (range 10)] (when (odd? n) n))) '(nil 2 nil 4 nil 6 nil 8 nil 10) (pairs (for [n (range 5)] (when (odd? n) n))) |