nth
(nth index lst)
This function returns the index element from list
lst.
|
Arguments |
index integer, the index of the value to be retrieved;
first element in a list uses index 0 |
|
Return |
the lst item at specified index; if index is equal or greater than the number of items in lst, NIL is returned |
|
Example |
(nth 1 '(a b c d))
returns b |
|
Remarks |
if index is negative, an error is triggered; |
|
|
often used code
like |
| © Bricsys NV. All rights reserved. |