From: Clint Hyde
Subject: RE: Behaviour of MAPCAR
Date: 
Message-ID: <3ujmhq$eqf@info-server.bbn.com>
In article <··········@rheged.dircon.co.uk> ·····@rheged.dircon.co.uk (Simon Brooke) writes:

--> In article <··········@sparcserver.lrz-muenchen.de>,
--> Stephan Kepser <······@cis.uni-muenchen.de> wrote:

--> >>(mapcar #'(lambda (x) '*a*) '(a . b))
--> >(*a*)

the Explorer signals an error.  Allegro 4.2 reports an error.  Lucid
4.1.1 does not.

--> It works as expected too.

well, NO, it doesn't. I don't expect the error of cadr of a dotted-pair
to be the same as nil.

in this case, Lucid is treating 

(mapcar #'(lambda (x) '*a*) '(a . b)) 

	as though it is

(mapcar #'(lambda (x) '*a*) '(a))

which it ain't.

--> >How should things work? Could someone please explain.
--> 
--> As they do. LUCID's behaviour is correct, and any other behaviour

NO! this is truly implementation dependent. if Lucid's implementation of
mapcar thinks that (cadr '(a . b)) is NIL, then it is wrong.

for (cadr '(a .  b)) the Explorer signals an error.  Allegro 4.2 signals
an error.  Lucid 4.1.1 signals an error. that is certainly right.

--> would astonish me. There is, after all, no CADR of a dotted pair.

that's right, there isn't. why should it be ok to assume that it's nil?

 -- clint