[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Implementation of MAP, SOME, EVERY, etc...
- To: Scott E. Fahlman <Fahlman@CMU-CS-C.ARPA>
- Subject: Implementation of MAP, SOME, EVERY, etc...
- From: David A. Moon <Moon@SCRC-STONY-BROOK.ARPA>
- Date: Thu, 28 Mar 85 13:19 EST
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: <FAHLMAN.12098517085.BABYL@CMU-CS-C.ARPA>
Date: Wed, 27 Mar 1985 23:19 EST
From: "Scott E. Fahlman" <Fahlman@CMU-CS-C.ARPA>
The Common Lisp LENGTH function returns NIL when given a circular list.
I disagree. On page 265 of the aluminum edition, we find the following
"LIST-LENGTH differs from LENGTH when the list is circular; LENGTH may
fail to return, whereas LIST-LENGTH will return NIL."
The feeling was that LENGTH was used often, and we didn't want to
require that it run more slowly on all lists just to accommodate the
rare case of a circular list.
My mistake. LENGTH used to check for circular lists, and when that feature
was removed from the language we saw no reason to remove it from our
implementation. I foolishly relied on memory and trying an example,
rather than checking the manual.