From ... Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news2.kpn.net!news.kpn.net!nslave.kpnqwest.net!nloc2.kpnqwest.net!nmaster.kpnqwest.net!nreader1.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: Lambda functions References: <9ofndq$1u0$1@rznews2.rrze.uni-erlangen.de> Mail-Copies-To: never From: Erik Naggum Message-ID: <3210190796619528@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 40 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 22 Sep 2001 23:40:00 GMT X-Complaints-To: newsmaster@Norway.EU.net X-Trace: nreader1.kpnqwest.net 1001202000 193.71.66.49 (Sun, 23 Sep 2001 01:40:00 MET DST) NNTP-Posting-Date: Sun, 23 Sep 2001 01:40:00 MET DST Xref: archiver1.google.com comp.lang.lisp:16797 * Kent M Pitman > I don't see anything in the ISO ISLISP spec that suggests that a lambda > expression is a function. Unless you can find a specific passage that > contradicts my belief, I'm pretty sure an implementation is buggy if it > lets you funcall a list whose car is LAMBDA. * Anette Stegmann > That surprises me. I only know old LISP dialects from the time between > 195X and 197X. Has something changed in the meantime? Your reading of what Kent wrote lacks the precision he put into it. > In my understanding a lamda expression is a way to notate a function. > > I am used to code like the following, IIRC: > > > ((lambda (x) (+ x x))2) > 4 > > > (setq f (lambda (x)(+ x x))) > > (f 4) > 8 If you really need exmples, the following form is what Kent was talking about (funcall '(lambda (x) (+ x x)) 3) None of your examples are funcalling a _list_, but are instead funcalling the value of an evaluated expression. Incidentally, the latter of your two examples presupposes a Lisp where functions and variables share the same value space. That is appropriate over in comp.lang.scheme. It is thus either (funcall f 4) or (setf (fdefinition 'f) ...) in a real Lisp. /// -- Why did that stupid George W. Bush turn to Christian fundamentalism to fight Islamic fundamentalism? Why use terms like "crusade", which only invokes fear of a repetition of that disgraceful period of Christianity with its _sustained_ terrorist attacks on Islam? He is _such_ an idiot.