listp (AutoLISP)

Verifies that an item is a list

Supported Platforms: Windows and Mac OS

Signature

(listp item)
item

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

Any atom, list, or expression.

Return Values

Type: T or nil

T if item is a list; otherwise nil. Because nil is both an atom and a list, the listp function returns T when passed nil.

Examples

(listp '(a b c))
T

(listp 'a)
nil

(listp 4.343)
nil

(listp nil)
T

(listp (setq v1 '(1 2 43)))
T