aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'src/clojure/contrib')
-rw-r--r--src/clojure/contrib/lazy_seqs.clj14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/clojure/contrib/lazy_seqs.clj b/src/clojure/contrib/lazy_seqs.clj
index e9915143..9b40af26 100644
--- a/src/clojure/contrib/lazy_seqs.clj
+++ b/src/clojure/contrib/lazy_seqs.clj
@@ -75,14 +75,12 @@
(list nil)))
(defn partition-all
- "Lazily break coll into chunks of length n (or less, for the final
- chunk)."
- ([n coll]
- (partition-all n n coll))
- ([n step coll]
- (when (seq coll)
- (lazy-cons (take n coll)
- (partition-all n step (drop step coll))))))
+ "Lazily break s into chunks of length n (or less, for the
+ final chunk)."
+ [n s]
+ (when (seq s)
+ (lazy-cons (take n s)
+ (partition-all n (drop n s)))))
(defn random-permutation
"Return a random permutation of coll"