nth
nth(x_index0l_list) =>g_result/nil
Description
Returns an index-selected element of a list, assuming a zero-based index.
Thus, nth(0 l_list) is the same as car(l_list). The value nil is returned if x_index0 is negative or is greater than or equal to the length of the list.
Arguments
Value Returned
|
If x_index0 is negative or is greater than or equal to the length of the list. |
Examples
nth( 1 '(a b c) )
=> b
z = '(1 2 3)
=> (1 2 3)
nth(2 z)
=> 3
nth(3 z)
=> nil
Related Topics
Return to top