consp (ANSI and GNU Common Lisp Document)

Next: atom, Previous: cons, Up: Conses Dictionary

#### 14.2.6 consp [Function]

`consp` object ⇒ generalized-boolean

#### Arguments and Values::

object—an object.

generalized-boolean—a generalized boolean.

#### Description::

Returns true if object is of type cons; otherwise, returns false.

#### Examples::

     (consp nil) ⇒  false
     (consp (cons 1 2)) ⇒  true

The empty list is not a cons, so

     (consp '()) ≡ (consp 'nil) ⇒  false

#### See Also::

listp

#### Notes::

     (consp object) ≡ (typep object 'cons) ≡ (not (typep object 'atom)) ≡ (typep object '(not atom))