partition
builtin-function
(partition size step padding seq)
(partition size step seq)
(partition size seq)
Divides seq into subsequences of length size. Default step equals size.
In order to get the right size, the last subsequence may borrow elements
from the sequence padding.
make-html > (partition 3 (series 10))
it: ((1 2 3) (4 5 6) (7 8 9))
make-html > (partition 3 2 (series 10))
it: ((1 2 3) (3 4 5) (5 6 7) (7 8 9))
make-html > (partition 3 4 (series 10))
it: ((1 2 3) (5 6 7))
make-html > (partition 3 3 '(a b) (series 10))
it: ((1 2 3) (4 5 6) (7 8 9) (10 a b))
make-html > (partition 3 3 '(a) (series 10))
it: ((1 2 3) (4 5 6) (7 8 9))