`partition` lazily divides a collection into subsequences of up to `n` items. Its optional `step` controls each subsequence’s starting offset, while optional padding fills a final incomplete subsequence. section 10.6
Fixed-size and overlapping partitions
`(partition 3 (range 10))` returns `((0 1 2) (3 4 5) (6 7 8))`, discarding the incomplete remainder. With a smaller step, `(partition 3 2 (range 10))` returns `((0 1 2) (2 3 4) (4 5 6) (6 7 8))`. Padding preserves the remainder: `(partition 3 3 [:a :b :c] (range 10))` ends with `(9 :a :b)`.
Important edge behavior:
- Use `partition-all` when the final subsequence may be smaller; use `partition-by` when a function determines split points. section 10.6
- A negative `n` returns an empty sequence; `n` equal to zero can produce an infinite sequence of empty lists, and `step` zero can repeat partitions indefinitely. section 10.6
