[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Atoms in association lists
- To: krall%pp.mcc.com%pp.mcc.com@mcc.com
- Subject: Re: Atoms in association lists
- From: coffee@aerospace.aero.org
- Date: Tue, 07 Jul 87 23:41:31 -0800
- Cc: common-lisp@sail.stanford.edu
- In-reply-to: Your message of Monday, 6 July 1987, 11:34-CDT. <8707061637.AA02959@pp.mcc.com>
- Posted-date: Tue, 07 Jul 87 23:41:31 -0800
I wonder how Gold Hill would handle the example on p. 281 of CLtL, i.e., a
NIL appearing in place of a pair in the a-list and an invocation of
(assoc nil a-list). Steele notes that (assoc item list :test fn) is
equivalent to (find item list :test fn :key #'car) *except* in this case,
because the FIND will take the CAR of NIL and succeed with NIL while the
ASSOC "will ignore the NIL in the a-list and continue to search for an
actual pair (cons) whose CAR is NIL." I rather suspect that the Gold Hill
implementation will fail to make this distinction, and if so I would consider
this a bug (no matter how special the case may be).