list?

Name

list? -- Test if an object is a proper list.

Type: function

Synopsis

list?( x, q);

Arguments

x

An instance of <object>

Return Values

q

An instance of <boolean>

Description

Returns true if and only if x is a proper list -- a sequence of zero or more cdr-linked pairs terminated with the empty list.

In particular, list? does finish and returns #f on cyclic lists. As a result, this function is fairly expensive (quadratic on long lists, although optimized for short ones).