diff options
author | Rich Hickey <richhickey@gmail.com> | 2009-01-14 23:29:36 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2009-01-14 23:29:36 +0000 |
commit | ba09ea0b890e086279d7bb89719e626de30357b8 (patch) | |
tree | ee42eaa9c882341af789ce62f428b9c3c3c961c0 | |
parent | 1200680a946a7d484bab9db1eab50769f2c00519 (diff) |
several macros claim to want only 2 binding forms, allow more, patch from Jarkko Oranen
-rw-r--r-- | src/clj/clojure/core.clj | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj index 5a4cef08..dc606274 100644 --- a/src/clj/clojure/core.clj +++ b/src/clj/clojure/core.clj @@ -1675,7 +1675,7 @@ [bindings & body] (assert-args dotimes (vector? bindings) "a vector for its binding" - (even? (count bindings)) "exactly 2 forms in binding vector") + (= 2 (count bindings)) "exactly 2 forms in binding vector") (let [i (first bindings) n (second bindings)] `(let [n# (int ~n)] @@ -2504,7 +2504,7 @@ [bindings & body] (assert-args when-first (vector? bindings) "a vector for its binding" - (even? (count bindings)) "exactly 2 forms in binding vector") + (= 2 (count bindings)) "exactly 2 forms in binding vector") (let [[x xs] bindings] `(when (seq ~xs) (let [~x (first ~xs)] @@ -2843,7 +2843,7 @@ ([bindings then else & oldform] (assert-args if-let (and (vector? bindings) (nil? oldform)) "a vector for its binding" - (even? (count bindings)) "exactly 2 forms in binding vector") + (= 2 (count bindings)) "exactly 2 forms in binding vector") (let [[form tst] bindings] `(let [temp# ~tst] (if temp# @@ -2858,7 +2858,7 @@ [bindings & body] (assert-args when-let (vector? bindings) "a vector for its binding" - (even? (count bindings)) "exactly 2 forms in binding vector") + (= 2 (count bindings)) "exactly 2 forms in binding vector") (let [[form tst] bindings] `(let [temp# ~tst] (when temp# |