- proper-list? xprocedure
Returns true iff X is a proper list -- a finite, nil-terminated list.
More carefully: The empty list is a proper list. A pair whose cdr is a proper list is also a proper list:
<proper-list> ::= () (Empty proper list) | (cons <x> <proper-list>) (Proper-list pair)
Note that this definition rules out circular lists. This function is required to detect this case and return false.
Nil-terminated lists are called "proper" lists by R5RS and Common Lisp. The opposite of proper is improper.
R5RS binds this function to the variable list?.
(not (proper-list? X)) = (or (dotted-list? X) (circular-list? X))