summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2008-10-25 14:21:01 +0000
committerRich Hickey <richhickey@gmail.com>2008-10-25 14:21:01 +0000
commit382b6ea0067b3058d2c59b4b4a1d57df99ecf17d (patch)
tree8bd864b89bf9855b0ec836112e7d02586b33257e /src
parentd073c63d6c1c802fc89936462dda74f1921c809e (diff)
made take less eager
Diffstat (limited to 'src')
-rw-r--r--src/clj/clojure/boot.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clj/clojure/boot.clj b/src/clj/clojure/boot.clj
index ca04ebe9..de1e8715 100644
--- a/src/clj/clojure/boot.clj
+++ b/src/clj/clojure/boot.clj
@@ -1288,7 +1288,7 @@
there are fewer than n."
[n coll]
(when (and (pos? n) (seq coll))
- (lazy-cons (first coll) (take (dec n) (rest coll)))))
+ (lazy-cons (first coll) (when (> n 1) (take (dec n) (rest coll))))))
(defn take-while
"Returns a lazy seq of successive items from coll while