[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Implementation of MAP, SOME, EVERY, etc...
- To: common-lisp@su-ai.ARPA
- Subject: Implementation of MAP, SOME, EVERY, etc...
- From: Dan Corkill <firstname.lastname@example.org>
- Date: Tue, 19 Mar 85 11:58 EST
There is an easily made implementation error in MAP, SOME, EVERY, etc.
The published semantics indicate that these functions use the length of
the shortest argument sequence to determine how many iterations to
perform (and in this way parallel the semantics of mapc, mapcar, etc.).
Thus it would appear that:
(map 'list '+ '(1 2 3) (star 2))
where star builds a circular list of its argument should be legal and
return => (3 4 5).
Implementations that use length to check the length of argument sequences
will break on such a call.