LIST-TYPE-SPECIFIER
Resolving this issue will help resolve FUNCTION-TYPE-REST-LIST-ELEMENT.
LIST type specifier would be extended to allow specification of arguments. e.g.,
(typep x 'list) => unchanged from current meaning
(typep x '(list <subtype>)) == (and (typep x 'list)
(typep (car x) <subtype>))
(typep x '(list <s1> <s2> ... <sN>)) ==
(and (typep x 'list)
(typep (car x) <s1>)
(typep (cadr x) <s2>)
...
(typep (car (last x)) <sN>))
Hence, the LIST type specifier is extended to allow specification of the types of the arguments.
(2) A new type specifier is added: LIST-OF.
(typep x 'LIST-OF) = error.
(typep x '(list-of <elttype>)) == (and (typep x 'list)
(dolist (elem x T)
(unless (typep x <elttype>)
(return nil))))
FUNCTION-TYPE-REST-LIST-ELEMENT proposal in a way which will allow type-specifiers to still be highly specific about the types of elements passed in &rest arguments.
In particular, (function (&rest (list-of number)) number), can be distinguished from (function (&rest (list complex fixnum bignum)) number).
-------