f



(mapcar 'quote '("1" "2" "3" "4"))

(mapcar 'quote  '("1" "2" "3" "4")) returns

((quote "4") (quote "4") (quote "4") (quote "4"))

Interesting and (for me) unexpected.  Because

(mapcar 'read  '("1" "2" "3" "4")) returns

(1 2 3 4)

and 

(mapcar 'princ  '("1" "2" "3" "4")) gives

1234("1" "2" "3" "4")

Why isn't (mapcar 'quote '("1" "2" "3" "4")) returning
((quote "1") (quote "2") (quote "3") (quote "4"))

Tom Haws
www.hawsedc.com
0
hawstom
9/16/2003 3:33:16 PM
comp.cad.autocad 3784 articles. 0 followers. Post Follow

2 Replies
1134 Views

Similar Articles

[PageSpeed] 21

Probably has to do with the fact that 'arg and (quote arg) are equivalent,
and LISP gets confused by the construct 'quote, which is about the same as
(quote (quote arg)). But I don't pretend to know all of the mechanics of the
error; the results are somewhat different in R14, BTW:

Command: (mapcar 'quote '("1" "2" "3" "4"))
((<Subr: #22e3e40> "4") (<Subr: #22e3e40> "4") (<Subr: #22e3e40> "4")
(<Subr:
#22e3e40> "4"))

___

"Tom Haws" <hawstom@despammed.com> wrote in message
news:77317472.0309160733.45ea9d8c@posting.google.com...
> (mapcar 'quote  '("1" "2" "3" "4")) returns
>
> ((quote "4") (quote "4") (quote "4") (quote "4"))


0
Paul
9/16/2003 4:42:58 PM
HiHo;
These folks can answer your question.
http://bigswamp.org/forum/index.php



"Tom Haws" <hawstom@despammed.com> wrote in message
news:77317472.0309160733.45ea9d8c@posting.google.com...
> (mapcar 'quote  '("1" "2" "3" "4")) returns
>
> ((quote "4") (quote "4") (quote "4") (quote "4"))
>
> Interesting and (for me) unexpected.  Because
>
> (mapcar 'read  '("1" "2" "3" "4")) returns
>
> (1 2 3 4)
>
> and
>
> (mapcar 'princ  '("1" "2" "3" "4")) gives
>
> 1234("1" "2" "3" "4")
>
> Why isn't (mapcar 'quote '("1" "2" "3" "4")) returning
> ((quote "1") (quote "2") (quote "3") (quote "4"))
>
> Tom Haws
> www.hawsedc.com


0
bestafor
9/16/2003 6:07:12 PM
Reply: