cdr
 
 
 

Returns a list containing all but the first element of the specified list

(cdr list)

Arguments

list

A list.

Return Values

A list containing all the elements of list, except the first element (but see Note below). If the list is empty, cdr returns nil.

NoteWhen the list argument is a dotted pair, cdr returns the second element without enclosing it in a list.

Examples

Command: (cdr '(a b c))

(B C)

Command: (cdr '((a b) c))

(C)

Command: (cdr '())

nil

Command: (cdr '(a . b))

B

Command: (cdr '(1 . "Text"))

"Text"

See Also