Description:
Segments <list> into <nlist> sublists of (if possible) equal length.
Ex. (list-explode '(1 2 3 4 5 6 7 8 9) 2) => ((1 2 3 4 5) (6 7 8 9))
Ex. (list-explode '(1 2 3 4 5 6 7 8 9) 5) => ((1 2) (3 4) (5 6) (7 8) (9)).
If the number of divisions exceeds the number of elements in the list, the divisions will have one element each, and remaining divisions are repeat the last division value.
Ex. (list-explode '(1 2 3 4 5 6 7 8 9) 12) => ((1) (2) (3) (4) (5) (6) (7) (8) (9) (9) (9) (9))
|