[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
maplist and lists
Date: Tue, 6 Jan 87 13:01 EST
From: David C. Plummer <DCP@QUABBIN.SCRC.Symbolics.COM>
Date: Tue, 6 Jan 87 12:57 EST
From: Brad Miller <miller@ACORN.CS.ROCHESTER.EDU>
That's pretty much what I expected. That still doesn't give an EXACT
definition. Consider
(maplist #'identity '(1 2 3))
vs (maplist #'identity '(1 2 3 . nil))
One could argue the final "dotted" NIL should be explicitly passed, and
the result of both would be
((1 2 3) (2 3) (3) NIL)
instead of the current
((1 2 3) (2 3) (3))
One could argue that, I suppose, but I don't. Since this is not a dotted list
(even if it is input that way it is still a "true" list) the current maplist
would be sufficient, and necessary to maintain compatibility.
Where this is of interest, by the way, consider a pattern matcher: (A . ?x)
is pretty regular input. (or ((A B . ?x) D ?y) for that matter...) the point
is that right now there are no DO or MAP forms that can handle this dotted
form in a trivial way. And, I don't see any particular reason why they
shouldn't. (This may just be shortsightedness on my part...)
Brad Miller
------
miller@cs.rochester.edu
miller@acorn.cs.rochester.edu
miller@rochester.arpa