diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-10-25 14:21:01 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-10-25 14:21:01 +0000 |
commit | 382b6ea0067b3058d2c59b4b4a1d57df99ecf17d (patch) | |
tree | 8bd864b89bf9855b0ec836112e7d02586b33257e /src | |
parent | d073c63d6c1c802fc89936462dda74f1921c809e (diff) |
made take less eager
Diffstat (limited to 'src')
-rw-r--r-- | src/clj/clojure/boot.clj | 2 |
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 |