Posted by Will on November 29, 19100 at 10:30:40:
In Reply to: Function body posted by Annie on November 29, 19100 at 02:39:52:
: In the Function class, should the body store the word "compute" or just the expression that follows it? The spec contradicts itself on this issue (in paragraph 2.1).
I meant for the body to be something like "compute (+ a b)"
[so yes there is a typo in the spec]
The idea was for the function body to be syntactically the same as
(and interpreted by the same routine as) a line typed in at the prompt.
By this interpretation, functions like:
function f(x) call g(x, 5)
would also be legal (one function calls another), so the "compute" is not
just a fixed keyword when it appears in a function body.
Sorry for the typo.