aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Sierra <mail@stuartsierra.com>2009-02-22 02:57:25 +0000
committerStuart Sierra <mail@stuartsierra.com>2009-02-22 02:57:25 +0000
commit82036fc6120109b8f75187ccea267a9601fc00ab (patch)
tree76d841923bf85938460d8ebd3f3d1a4ceb7ba658
parentfa0a9e385fe84d1c81a3341c5f95e2577e8ed868 (diff)
condt.clj: fixed to work with new lazy clojure
-rw-r--r--src/clojure/contrib/condt.clj8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/clojure/contrib/condt.clj b/src/clojure/contrib/condt.clj
index f4019ba8..41c421a5 100644
--- a/src/clojure/contrib/condt.clj
+++ b/src/clojure/contrib/condt.clj
@@ -1,7 +1,7 @@
;;; condt.clj - generic case-like macro using template expressions
;; By Stuart Sierra, http://stuartsierra.com/
-;; December 23, 2008
+;; February 21, 2009
;; Copyright (c) Stuart Sierra, 2008. All rights reserved. The use
;; and distribution terms for this software are covered by the Eclipse
@@ -14,6 +14,8 @@
;; CHANGE LOG
;;
+;; February 21, 2009: fixed to work with new lazy Clojure
+;;
;; December 23, 2008: renamed to condt, since clojure.core now
;; contains a (different) condp as of Clojure SVN rev. 1180
;;
@@ -38,7 +40,7 @@
(= 1 (count c)) (first c)
:else (list 'if (list test-fn-sym (first c))
(second c)
- (this (rrest c)))))]
+ (this (nthnext c 2)))))]
`(let [~test-fn-sym (clojure.contrib.template/template ~expr)]
~(f clauses))))
@@ -52,6 +54,6 @@
(= 1 (count c)) (throw (IllegalStateException. "Odd number of clauses in econdt."))
:else (list 'if (list test-fn-sym (first c))
(second c)
- (this (rrest c)))))]
+ (this (nthnext c 2)))))]
`(let [~test-fn-sym (clojure.contrib.template/template ~expr)]
~(f clauses))))