next up previous
Contents Next: setf (MACRO) Up: Appendix: Selected LISP Previous: reverse (FUNCTION)

second, third, etc. (FUNCTIONS)

Format: (second <list>) (third <list>) etc.

Required arguments: 1

The argument must evaluate to a list

These functions return the obvious element from the given list, or nil if the list is shorter than the selected element would require.

Examples:

>(second '(1 2 3 4))        
2

>(fourth '(1 2 3 4))
4

>(ninth '(1 2 3 4))
NIL



© Colin Allen & Maneesh Dhagat
November 1999