Function Entry: CDR

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: CDR

Name

cdr

Class

Function

Syntax

(cdr lst)

Arguments and Values

  • lst: list, including the empty list; dotted pairs are also explicitly covered by Autodesk's note

Description

Returns all but the first element of the specified list.

Return Values

If lst is a proper list with two or more elements, returns a list containing all elements of lst except the first.

If lst is the empty list, returns nil.

If lst is a dotted pair, returns the second element without enclosing it in a list.

Side Effects

None.

Examples

  • (cdr '(a b c)) => (B C)
  • (cdr '((a b) c)) => (C)
  • (cdr '()) => nil
  • (cdr '(a . b)) => B
  • (cdr '(1 . "Text")) => "Text"

Compatibility

Unlike car, Autodesk explicitly documents dotted-pair behavior for cdr.

Availability

  • AutoCAD 2026: documented (per Autodesk reference page).
  • BricsCAD V26: presumed compatible (no contradicting page found).
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.