aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clojure/contrib/seq_utils.clj6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clojure/contrib/seq_utils.clj b/src/clojure/contrib/seq_utils.clj
index 007c1755..de30ecfb 100644
--- a/src/clojure/contrib/seq_utils.clj
+++ b/src/clojure/contrib/seq_utils.clj
@@ -94,9 +94,9 @@
"Similar to lazy-seq but binds the resulting seq to the supplied
binding-name, allowing for recursive expressions."
[binding-name & body]
- `((fn helper# []
- (lazy-seq (let [~binding-name (helper#)] ~@body)))))
-
+ `(let [s# (atom nil)]
+ (swap! s# (constantly (lazy-seq (let [~binding-name @s#] ~@body))))))
+
(defmacro rec-cat
"Similar to lazy-cat but binds the resulting sequence to the supplied
binding-name, allowing for recursive expressions."