cdr (AutoLISP)

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

Supported Platforms: Windows and Mac OS

Signature

(cdr list)
list

Type: List

A list with two or more elements.

Return Values

Type: Integer, Real, String, List, T or nil

A list containing all the elements of list, except the first element. If the list is empty, cdr returns nil.

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

Examples

(cdr '(a b c))
(B C)

(cdr '((a b) c))
(C)

(cdr '())
nil

(cdr '(a . b))
B

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