week2 tweaks
[lambda.git] / week1.mdwn
index 84dc62f..967f814 100644 (file)
@@ -14,7 +14,7 @@ See also:
 
 *      [Chris Barker's Lambda Tutorial](http://homepages.nyu.edu/~cb125/Lambda)
 *      [Lambda Animator](http://thyer.name/lambda-animator/)
-*       [Penn lambda calculator](http://www.ling.upenn.edu/lambda/) Pedagogical software developed by Lucas Champollion, Josh Tauberer and Maribel Romero.  Linguistically oriented. 
+*      [Penn lambda calculator](http://www.ling.upenn.edu/lambda/) Pedagogical software developed by Lucas Champollion, Josh Tauberer and Maribel Romero.  Linguistically oriented. 
 *      MORE
 
 The lambda calculus we'll be focusing on for the first part of the course has no types. (Some prefer to say it instead has a single type---but if you say that, you have to say that functions from this type to this type also belong to this type. Which is weird.)
@@ -37,7 +37,6 @@ We'll tend to write <code>(&lambda;a M)</code> as just `(\a M)`, so we don't hav
 <strong>Application</strong>: <code>(M N)</code>
 </blockquote>
 
-Some authors reserve the term "term" for just variables and abstracts. We'll probably just say "term" and "expression" indiscriminately for expressions of any of these three forms.
 
 Examples of expressions:
 
@@ -79,6 +78,10 @@ For instance:
 
 The first occurrence of `x` in T is free.  The `\x` we won't regard as containing an occurrence of `x`. The next occurrence of `x` occurs within a form that begins with `\x`, so it is bound as well. The occurrence of `y` is bound; and the occurrence of `z` is free.
 
+To read further:
+
+*      [[!wikipedia Free variables and bound variables]]
+
 Here's an example of beta-reduction:
 
        ((\x (y x)) z)
@@ -309,7 +312,7 @@ Finally, you'll see the term **dynamic** used in a variety of ways in the litera
 
 *      dynamic versus static typing
 
-*      dynamic versus lexical scoping
+*      dynamic versus lexical [[!wikipedia Scope (programming) desc="scoping"]]
 
 *      dynamic versus static control operators
 
@@ -317,6 +320,16 @@ Finally, you'll see the term **dynamic** used in a variety of ways in the litera
 
 For the most part, these uses are only loosely connected to each other. We'll tend to use "imperatival" to describe the kinds of semantic properties made available in dynamic semantics, languages which have robust notions of sequencing changes, and so on.
 
+To read further about the relation between declarative or functional programming, on the one hand, and imperatival programming on the other, you can begin here:
+
+*      [[!wikipedia Declarative programming]]
+*      [[!wikipedia Functional programming]]
+*      [[!wikipedia Purely functional]]
+*      [[!wikipedia Referential transparency (computer science)]]
+*      [[!wikipedia Imperative programming]]
+*      [[!wikipedia Side effect (computer science) desc="Side effects"]]
+
+
 Map
 ===
 
@@ -343,6 +356,9 @@ combinatorial logic</td>
 </table>
 
 
+[Correction: OCaml is Turing complete, but I'm not sure if the merely functional part is; I suspect it's not.]
+
+
 Rosetta Stone
 =============
 
@@ -380,8 +396,9 @@ The following site may be useful; it lets you run a Scheme interpreter inside yo
 
                ((foo 2) 3)
 
-       These functions are "curried". MORE
-       `foo 2` returns a `2`-fooer, which waits for an argument like `3` and then foos `2` to it. `( + ) 2` returns a `2`-adder, which waits for an argument like `3` and then adds `2` to it.
+       These functions are "curried". `foo 2` returns a `2`-fooer, which waits for an argument like `3` and then foos `2` to it. `( + ) 2` returns a `2`-adder, which waits for an argument like `3` and then adds `2` to it. For further reading: 
+
+*      [[!wikipedia Currying]]
 
        In Scheme, on the other hand, there's a difference between `((foo 2) 3)` and `(foo 2 3)`. Scheme distinguishes between unary functions that return unary functions and binary functions. For our seminar purposes, it will be easiest if you confine yourself to unary functions in Scheme as much as possible.
 
@@ -453,9 +470,12 @@ The following site may be useful; it lets you run a Scheme interpreter inside yo
 
 3.     Anonymous functions
 
-       Functions are "first-class values" MORE in the lambda calculus, in Scheme, and in OCaml. What that means is that they can be arguments to, and results of, other functions. They can be stored in data structures. And so on.
+       Functions are "first-class values" in the lambda calculus, in Scheme, and in OCaml. What that means is that they can be arguments to, and results of, other functions. They can be stored in data structures. And so on. To read further:
+
+       *       [[!wikipedia Higher-order function]]
+       *       [[!wikipedia First-class function]]
 
-       First, we'll show what "anonymous" functions look like. These are functions that have not been bound as values to any variables. That is, there are no variables whose value they are.
+       We'll begin by looking at what "anonymous" functions look like. These are functions that have not been bound as values to any variables. That is, there are no variables whose value they are.
 
        In the lambda calculus:
 
@@ -689,6 +709,10 @@ The following site may be useful; it lets you run a Scheme interpreter inside yo
 
        When a previously-bound variable is rebound in the way we see here, that's called **shadowing**: the outer binding is shadowed during the scope of the inner binding.
 
+       See also:
+
+       *       [[!wikipedia Variable shadowing]]
+
 
 Some more comparisons between Scheme and OCaml
 ----------------------------------------------