[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
true-list type specifier
- To: NGALL@BBNG.ARPA
- Subject: true-list type specifier
- From: "Scott E. Fahlman" <Fahlman@C.CS.CMU.EDU>
- Date: Sun, 20 Apr 1986 14:41:00 -0000
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: Msg of 19 Apr 1986 19:11-EST from NGALL at G.BBN.COM
- Sender: FAHLMAN@C.CS.CMU.EDU
(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