The attached patch improves error signalling when passing improper lists to some of the sequence function where the docstring said that they'd signal an error.
Additionally, introduce the macro DO-PROPER-LIST, and the function PROPER-LIST-LENGTH -- which are used to remove some code duplication.
-T.