std-subseq | ![]() |
STD-SUBSEQ
extracts a sublist from a list. It returns the list including the start element until -excluding- the end element where start and end are integer indices of the list.
It is an error if the condition (<= 0 start end (length lst))
is not true.
(std-subseq '(0 1 2 3) 1 3) => (1 2) (std-subseq '(0 1 2 3) 0 3) => (0 1 2) (std-subseq '(0 1 2 3) 0 0) => nil (std-subseq '(0 1 2 3) 0 -1) => error (std-subseq '(0 1 2 3) 3 4) => (3) (std-subseq '(0 1 2 3) 4 5) => error (std-subseq '(0 1 2 3) 5 7) => error
start, end: integer numbers.
lst: any proper list.
A list.
None.
(std-require 'STDLIST)
Defined in STDLIST