[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG -- NOT



In article <9209181742.AA03530@krieger.itd.nrl.navy.mil> zuniga@excalibur.itd.nrl.navy.mil (Mike Zuniga) writes:

   Sorry, I did not express what I wanted to. in general, when I try

   (mapcar '(lambda (x) (function x)) lis)
   where function is something like print or car, the compiler balks. However,
   it does take (mapcar 'function lis) as it should. ALso, this problem is not
   related to the first one with the sort as far as me coding them in the same
   file. Both problems accur several times in my code of about 200 functions.
   They werent a problem when I used them in a MCL version 1.3.2.

This is new behavior in ANSI Common Lisp. Lambda expressions and
symbols are no longer functions. See CLtL2, pg. 37.

For your first example you need to write
(mapcar #'(lambda (x) (print x)) lis)

Your second example works because some functions will coerce a symbol
to a function; mapcar is one of them.

--
Tim Moore                    moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore
"Wind in my hair - Shifting and drifting - Mechanical music - Adrenaline surge"
	- Rush