Re:Little Lisp interpreter
by asdlllkasdasd on Tuesday May 23, 2017 @10:48PM
(#14407259)
You are right about both points!
PS: The second you quoted out of order. If you reread, you will see that I was referring to FOO as the first "argument" (a typo for "element"..).
No, in Lisp FOO is a name of a function, not a function itself.
Thus FOO evaluates to a function (otherwise it would be an error) in a Lisp-1 like Scheme. In a Lisp-2 like Common Lisp, one would say that the function value of FOO is retrieved.
> Indeed, when strictly evaluating (foo '(1 2)), first the arguments are evaluated
Actually not. In Lisp the first item needs to be looked at first. If it is determined to name a function, then we can evaluate the arguments, of which there is only one in this case.