car (list) cdr (list) caar (list) cadr (list) cdar (list) cddr (list) caaar (list) caadr (list) cadar (list) caddr (list) cdaar (list) cdadr (list) cddar (list) cdddr (list)
The car function returns the first element of a list. The cdr function returns all of the list except for the first element. The remaining functions in this group are simply shortcuts for the common combinations of car and cdr. The shortcut functions are read from left to right as nested car and cdr calls. Thus, a call to caddr (mylist) would be equivalent to car (cdr (cdr (mylist))). If the argument is not a list, the result is nil. The cdr function will only return a non-list result in the case of a dotted pair.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.