[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

true-list type specifier

    (defun foo (my-list)
      (declare (list my-list))
      (member 'my my-list))

    and a compiler that has been told to turn off type-checking where
    licenced by user declarations.  One might assume that MEMBER need not
    do a LIST check on each CDR of MY-LIST.  But this is not the case, the
    above declaration merely licences the compiler to assume that MY-LIST
    is NIL or a CONS, but a type check should still be done on the CDR of
    MY-LIST (when it is a CONS), and on its CDR, etc.

    My question is:  How does one declare that MY-LIST is a true list?

You're wrong here.  The term "list" already means what you want
to call a "true list".  See the definition on page 26.

-- Scott