• (partition-all n coll)
  • (partition-all n step coll)
DEPRECATED. Prefer clojure.core version.
Returns a lazy sequence of lists like clojure.core/partition, but may
include lists with fewer than n items at the end.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/seq_utils.clj:143 top

(defn partition-all
  "DEPRECATED. Prefer clojure.core version.
  Returns a lazy sequence of lists like clojure.core/partition, but may
  include lists with fewer than n items at the end."
  {:deprecated "1.2"}
  ([n coll]
     (partition-all n n coll))
  ([n step coll]
     (lazy-seq
      (when-let [s (seq coll)]
        (cons (take n s) (partition-all n step (drop step s)))))))
Vars in clojure.contrib.seq-utils/partition-all: cons defn drop lazy-seq partition-all take when-let
Used in 0 other vars

Comments top

No comments for partition-all. Log in to add a comment.