[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposal for ENDP
- To: common-lisp at SU-AI
- Subject: Proposal for ENDP
- From: STEELE at CMU-20C
- Date: Sat, 11 Sep 1982 20:48:00 -0000
Recall that ENDP is the newly-recommended predicate for testing for
the end of a list. I propose the small change that ENDP take an optional
second argument, which is the list whose end you are checking for.
All this does is allow better error reporting:
(defun endp (thing &optional (list () listp))
(cond ((consp thing) nil)
((null thing) t)
(listp (cerror :improperly-terminated-list
"The non-null atom ~S terminated the list ~S"
thing list)
t)
(t (cerror :improperly-terminated-list
"The non-null atom ~S terminated a list"
thing))))
-------