std-select | ![]() |
It works like std-elt
or nth
but allows the access of multiple elements also like std-subseq
.
If i is an integer it works exactly the same as STD-ELT
.
If i is a list of integers the indices are gathered in the order as specified in i and the resulting list of elements is returned.
This is similar to the xlisp extension select
.
STD-SELECT
throws an index out of range error, which might be more appropriate for finding sources of errors.
(std-select '(a b c d) 0) => A (std-select '(a b c d) '(1 0) => (B A) (std-select '(a b c d) '(1 0 4) => ERROR
lst: any list, including not proper lists
i: any integer which satisfies 0 <= i < (length lst)
list-of-i: list of integers which satisfies 0 <= i < (length lst)
The specified element(-s) of the list.
None.
(std-require 'STDLIST)
Defined in STDLIST