Skip to content

clojure.core/partition-all

View this page on ClojureDocs

Type: function Added: Clojure 1.2 Examples: 4 Runnable: 3
([n] [n coll] [n step coll])

Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end. Returns a stateful transducer when no collection is provided.

Examples

by nipra on
by Tap on
by gerritjvv on . May have evaluation errors.
by ningDr on

Note by kkprop

be aware of the case of n is 0

(partition-all 0 '(1 2 3))

will cause repl blocked and cpu 100%

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.