std-nthcdr | ![]() |
"list behind (including) the nth element"
STD-NTHCDR
returns all elements after the nth element of a list, including the nth element. It's the complement to STD-FIRSTN
.
If n is 0 or negative the list is returned. If n is equal or larger than the length of the list NIL
is returned.
(std-nthcdr 2 '(0 1 2 3)) => (2 3) (std-firstn 2 '(0 1 2 3)) => (0 1) (std-nthcdr 0 '(0 1 2 3)) => (0 1 2 3) (std-nthcdr 4 '(0 1 2 3)) => nil (std-nthcdr 5 '(0 1 2 3)) => nil
n: an integer number.
lst: any proper list.
A list.
None.
(std-require 'STDLIST)
Defined in STDLIST