Re: [Sbcl-help] New user - Various Questions, SETQ, adding lists...

On Sun, Dec 12, 2010 at 11:27 PM, Pascal J. Bourguignon
<pjb@...> wrote:
>> SBCL complains about "undefined function: RESULT". :-(
>
> In lisp code, parentheses are used only for one thing, but always for
> that one thing: to apply an operator (call a function). So when you
> write:
>
> (result)
>
> you are calling the function named RESULT;
Thanks. This really caught me off-guard. It's different from other
languages where you can use parentheses just to group statements. I'll
note, however, that there are a few instances where a parenthesis does
not mean "apply operator":
(defun foo()
(let ((a 1) (b 2) (c 3))
(+ a b c)))
There are seven open parenthesis "(" here, but only three of them have
to do with operators. In this context, it wasn't evident to me that
the "result" variable didn't have to be in a parenthesis as well. But
anyway, I now have a clearer picture of how Lisp is meant to fit
together.
Thanks for the help.
Cheers,
Daniel.
--
No trees were destroyed in the generation of this email, but a large
number of electrons were severely inconvenienced.