Type Entry: LIST

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

Type Entry: LIST

Name

LIST

Class

Type

Description

The designator type returns for a cons cell. The LIST type set is cons cells only — proper lists with at least one element and dotted / improper pairs. The empty list is NOT of type LIST:

(type '(a . d)) => LIST
(type '(1 2 3)) => LIST
(type 'nil)     => nil
(type '())      => nil

So (type X) returns LIST iff X is a cons; for the empty list it returns nil, not LIST.

Normative note: the LIST designator vs the listp predicate

LIST (the type designator) and listp (the predicate) do NOT cover the same set, and must not be conflated:

  • listp true set = conses ∪ {nil} — (listp nil) returns T.
  • LIST type set = conses only — (type nil) returns nil.

Thus nil satisfies listp but is not of type LIST; this is consistent with nil being bottom / the empty list rather than a cons (see "Distinguished Object Entry: NIL").

Representation

A chain of cons cells; a dotted pair prints as (a . d).

Valid Operations

  • car, cdr, cons, list, append, mapcar, foreach, association-list operations
  • type, listp (but see the note above), atom

Availability

  • AutoCAD 2026: documented (per type reference page).
  • BricsCAD V26: documented; conses-only behaviour confirmed by probe.
  • Status: documented.

Source Notes