From ... From: Erik Naggum Subject: Re: Returning Functions Date: 1997/10/02 Message-ID: <3084810271646576@naggum.no>#1/1 X-Deja-AN: 277489952 References: <60vm5a$nnm$1@news.ycc.yale.edu> <343370AA.C808805D@uclink4.berkeley.edu> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * Aaron Leung | Lisp is somewhat less simple/consistent than Scheme in the respect that | functions are evaluated differently than other types of values and that | they exist in different namespaces. When you want to treat functions | like values in Lisp, you have to prepend it with the #' (pronounced | "sharp-quote"). The sharp-quote is an abbreviation of a special form | called FUNCTION. #'(lambda (x) (* x x)) is the same as (function (lambda | (x) (* x x))), and the Scheme equivalent is just (lambda (x) (* x x)). `lambda' is a macro in ANSI Common Lisp that returns itself as a function object. its definition is suggested in the specification. (defmacro lambda (&whole form &rest bvl-decls-and-body) (declare (ignore bvl-decls-and-body)) `#',form) discommending unquoted `lambda' forms may be the only point on which I disagree with Paul Graham, but I think omitting the #' on `lambda' forms makes perfect sense. so did, apparently, a sufficient number of members of the ANSI Common Lisp committee. #\Erik -- if you think this year is "97", _you_ are not "year 2000 compliant". see http://www.naggum.no/emacs/ for Emacs-20-related material.