std-split-list | ![]() |
STD-SPLIT-LIST
splits the list into sublists of maximal n elements.
If n is 0 or negative an error is thrown, if n >= (length lst) a single list of lst is returned.
(std-split-list 3 '(0 1 2 3 4 5 6 8 9))
=> ((0 1 2)(3 4 5)(6 7 8)(9)) (std-split-list 0 '(0 1 2 3 4 5 6 8 9))
=> Error (std-split-list 10 '(0 1 2 3 4 5 6 8 9))
=> ((0 1 2 3 4 5 6 7 8 9))
n: any positive integer number >0.
lst: any proper list.
A list of lists.
None.
(std-require 'STDLIST)
Defined in STDLIST