vl-list-length
 
 
 

Calculates list length of a true list

(vl-list-length  list-or-cons-object)

Arguments

list-or-cons-object

A true or dotted list.

Return Values

An integer containing the list length if the argument is a true list; otherwise nil if list-or-cons-object is a dotted list.

Compatibility note: The vl-list-length function returns nil for a dotted list, while the corresponding Common LISP function issues an error message if the argument is a dotted list.

Examples

_$ (vl-list-length nil)
0
_$ (vl-list-length '(1 2))
2
_$ (vl-list-length '(1 2
. 3))
nil
See Also