summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2008-04-20 19:46:44 +0000
committerRich Hickey <richhickey@gmail.com>2008-04-20 19:46:44 +0000
commit110ad2b1764d2f0ff21c5566028671a36cde1e39 (patch)
tree9d30e8ebdad4cde909a28093b24afade49b0cf93
parent37713c695d53f08de17b3daec013e7c396769ca9 (diff)
back to simple logic for take
-rw-r--r--src/boot.clj5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/boot.clj b/src/boot.clj
index 9478262c..5c25db05 100644
--- a/src/boot.clj
+++ b/src/boot.clj
@@ -1065,10 +1065,7 @@ not-every? (comp not every?))
there are fewer than n."
[n coll]
(when (and (pos? n) (seq coll))
- (lazy-cons (first coll)
- (if (= 1 n)
- nil
- (take (dec n) (rest coll))))))
+ (lazy-cons (first coll) (take (dec n) (rest coll)))))
(defn take-while
"Returns a lazy seq of successive items from coll while