From: jim Date: Tue, 10 Feb 2015 17:16:30 +0000 (-0500) Subject: expand on Scheme heads X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=13d1f0c86e0ffb3fdeca38f40640160b579049aa;ds=inline expand on Scheme heads --- diff --git a/rosetta1.mdwn b/rosetta1.mdwn index 1c603674..eda1a9f8 100644 --- a/rosetta1.mdwn +++ b/rosetta1.mdwn @@ -110,7 +110,13 @@ Scheme has no infix operators. It ruthlessly demands that all functions to be ap (+ 3 2) -and the like. Moreover, in Scheme parentheses are never optional and never redundant. In contexts like this, the parentheses are necessary to express that the function is being applied; `+ 3 2` on its own is not a complete Scheme expression. And if the `+` were surrounded by its own parentheses, as in: +and the like. Here is an example where the function to be applied is the result of evaluating a more complex expression: + + ((if #t + *) 3 2) + +which will evaluate to `5`, not `6`. + +In Scheme the parentheses are never optional and never redundant. In expressions like `(+ 3 2)`, the parentheses are necessary to express that the function is being applied; `+ 3 2` on its own is not a complete Scheme expression. And if the `+` were surrounded by its own parentheses, as in: ((+) 3 2)