tweak untyped_evaluators, add symlink
[lambda.git] / exercises / assignment7.mdwn
index 7d03eda..f0213aa 100644 (file)
@@ -83,7 +83,7 @@ This part of the exercise is the "VB" part of that code.
 You'll see that in the `eval` function, a new kind of value `Closure (ident) (term) (env)`
 is used. What's that about?
 
-[[Read about Closures here.|/topics/closures]]
+[[Read about Closures here.|/topics/week7_environments_and_closures]]
 
 
 So that's what's going on with those `Closure`s. In the simple code we gave you to work with, we just made these another clause in the `term` datatype. That's really not correct. `Closure`s aren't terms. The syntax for our language doesn't have any constituents that get parsed into `Closure`s. `Closure`s are only created *during the course of evaluating terms*: specifically, when a variable gets bound to an abstract, which may itself contain variables that are locally free (not bound by the abstract itself). So really we should have two datatypes, one for terms, and another for the *results* (sometimes called "values") that terms can evaluate to. `Closure`s are results, but they aren't terms. `App`s are terms, but not results. If we had primitive numbers or other constants in our language, they might be both terms and results. In the fuller code from which your homework is simplified, this is how the types are in fact defined. But it makes things more complicated. So to keep things simple for the homework, we just pretended like `Closure`s were a new, exotic kind of `term`.