Format: (nth <index> <list>)
Required arguments: 2
<index>: any expression which returns a positive integer (fixnum). <list>: any expression which returns a list.
The function nth returns the indexed element of <list>. <index> must be a non-negative integer. 0 indicates the first element of <list>, 1 the second, etc. An index past the end of the list will cause nth to return nil.
Examples:
>(nth 0 '(picard riker work crusher)) PICARD >(nth 2 '((captain picard) (commander riker) (lieutenant worf) (ensign crusher))) (LIEUTENANT WORF)
© Colin Allen & Maneesh Dhagat