User Tools


Function CONSP

Syntax

  • consp objectgeneralized-boolean

Arguments and Values

Description

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

Examples

(consp nil)

false

(consp (cons 1 2))

true

(consp '())

false

; ≡ (consp 'nil) ≡ (consp nil)

Side Effects

None.

Affected By

None.

Exceptional Situations

None.

Example Implementation

These are all equivalent:

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

Notes

None.