From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!ossa.telenet-ops.be!nmaster.kpnqwest.net!nreader2.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: #'(lambda ... (lambda References: Mail-Copies-To: never From: Erik Naggum Message-ID: <3227971048368989@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 35 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 16 Apr 2002 18:37:28 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader2.kpnqwest.net 1018982248 193.71.199.50 (Tue, 16 Apr 2002 20:37:28 MET DST) NNTP-Posting-Date: Tue, 16 Apr 2002 20:37:28 MET DST Xref: archiver1.google.com comp.lang.lisp:31842 * "Luke Crook" | I was wondering why this: | | (setf (symbol-function 'double) #'(lambda (x) (* x 2))) | | is the same as: | | (setf (symbol-function 'double) (lambda (x) (* x 2))) They are not the same. They have the same effect. Lots of things have the same effect. Just because two things have the same effect, does not mean you can use the difference as basis for any inference about other things that are similarly different without understanding the cause. Quite elementary logic, this. If you do not command a reasonable level of reasoning, you will go wrong in so many wasteful ways that you should go back to study reasoning and logic, and not attempt to stumble along with random guesswork and clueless trial and error. | Why doesn't the setf in the latter return an error when it tries to | evaluate the lambda expression? Look it up in your favorite Common Lisp reference. Things like this are very well explained in every serious introduction to Common Lisp, and then you have the specification. But how did you manage to write this code in the first place? It is so odd to mess with the symbol-function slot of a symbol without knowing what #' means or how the macro lambda works. /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief. Post with compassion: http://home.chello.no/~xyzzy/kitten.jpg