Use `partition-all` when work needs to be done in batches and the final batch must not be lost. It splits a collection into subsequences of at most `n` items, retaining a smaller final subsequence when items remain. The result is lazy. section 10.6
Keep the remainder
`(partition-all 3 (range 10))` returns `((0 1 2) (3 4 5) (6 7 8) (9))`. By contrast, `partition` omits `(9)` because it produces only complete groups unless given padding. section 10.6
The forms are `(partition-all n coll)`, `(partition-all n step coll)`, and `(partition-all n)`. `step` sets the distance between the starts of successive groups: `(partition-all 3 2 (range 10))` returns `((0 1 2) (2 3 4) (4 5 6) (6 7 8) (8 9))`. The one-argument form returns a transducer for use in a processing pipeline. section 10.6
Use a positive `n` for ordinary batching. A negative `n` returns an empty list; zero can produce an infinite sequence of empty lists. The input collection must support `seq`. Unlike count-based `partition-all`, `partition-by` starts a new group when the value returned by a function changes. section 10.6
Batch parallel work
`(pmap insert-query (partition-all 10 records))` passes groups of records to a query-building function, including any short final group. Grouping smaller tasks can improve `pmap` performance, but benchmark it rather than assuming it will. section 10.6 section 9.1.5
