Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!oliveb!intelca!mipos3!td2cad!brister From: brister@td2cad.intel.com (James Brister) Newsgroups: comp.lang.lisp Subject: Object in form's function position. Message-ID: Date: 7 Mar 89 05:23:20 GMT Sender: news@td2cad.intel.com Distribution: usa Organization: Intel Corp., Santa Clara, CA, USA Lines: 34 COMMON LISP gurus (and maybe non-gurus--I'm still new to LISP). I have a question concerning the evaluation of the first element in a form. If the first element is not a symbol then only a lambda expression is legal (right?) According to CLtL the lambda expression is treated as the name of a function and isn't evaluated--which wouldn't be meaningful. The question. What about the language prohibits this? It would be nice to say: (defun foo () '(lambda (x) (* x x))) or even (defun foo () #'(lambda (x) (* x x)) and then ((foo) 4) instead of having to mess with funcall's all the time. It seems to me (and I'll admit to ignorance) that it wouldn't be too hard to have the evaluation say "If the element is not a symbol or a lambda expression, then evaluate this (sub) form and apply its returned value to the arguments of the function call." I noticed Scheme does this and Guy Steele was involved in both language specifications. Comments? Should I put on my asbestos underwear? James -- --------------------------------------------------------------------------- James Brister brister@td2cad.intel.com (408) 765-9713 ...!decwrl!td2cad!brister "Is the set of all respectable sets respectable?"