week1: fix markup processing?
[lambda.git] / test2.mdwn
index c6d64ac..dcc8a1a 100644 (file)
@@ -356,7 +356,6 @@ combinatorial logic</td>
 <td width=30%>&nbsp;
 </table>
 
-
 Rosetta Stone
 =============
 
@@ -533,6 +532,7 @@ Here's how it looks to say the same thing in various of these languages.
 
        Read this several times until you understand it.
 
+
 7.     Functions can also be bound to variables (and hence, cease being "anonymous").
 
        In Scheme:
@@ -678,113 +678,3 @@ Here's how it looks to say the same thing in various of these languages.
 
        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.
 
-
-Some more comparisons between Scheme and OCaml
-----------------------------------------------
-
-11.    Simple predefined values
-
-       Numbers in Scheme: `2`, `3`  
-       In OCaml: `2`, `3`
-
-       Booleans in Scheme: `#t`, `#f`  
-       In OCaml: `true`, `false`
-
-       The eighth letter in the Latin alphabet, in Scheme: `#\h`  
-       In OCaml: `'h'`
-
-12.    Compound values
-
-       These are values which are built up out of (zero or more) simple values.
-
-       Ordered pairs in Scheme: `'(2 . 3)`  
-       In OCaml: `(2, 3)`
-
-       Lists in Scheme: `'(2 3)`  
-       In OCaml: `[2; 3]`  
-       We'll be explaining the difference between pairs and lists next week.
-
-       The empty list, in Scheme: `'()`  
-       In OCaml: `[]`
-
-       The string consisting just of the eighth letter of the Latin alphabet, in Scheme: `"h"`  
-       In OCaml: `"h"`
-
-       A longer string, in Scheme: `"horse"`  
-       In OCaml: `"horse"`
-
-       A shorter string, in Scheme: `""`  
-       In OCaml: `""`
-
-13.    Function application
-
-       Binary functions in OCaml: `foo 2 3`
-       
-       Or: `( + ) 2 3`
-
-       These are the same as: `((foo 2) 3)`. In other words, functions in OCaml 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.
-
-       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.
-
-       Additionally, as said above, Scheme is very sensitive to parentheses and whenever you want a function applied to any number of arguments, you need to wrap the function and its arguments in a parentheses.
-
-
-What "sequencing" is and isn't
-------------------------------
-
-We mentioned before the idea that computation is a sequencing of some changes. I said we'd be discussing (fragments of, and in some cases, entire) languages that have no native notion of change.
-
-Neither do they have any useful notion of sequencing. But what this would be takes some care to identify.
-
-First off, the mere concatenation of expressions isn't what we mean by sequencing. Concatenation of expressions is how you build syntactically complex expressions out of simpler ones. The complex expressions often express a computation where a function is applied to one (or more) arguments,
-
-Second, the kind of rebinding we called "shadowing" doesn't involve any changes or sequencing. All the precedence facts about that kind of rebinding are just consequences of the compound syntactic structures in which it occurs.
-
-Third, the kinds of bindings we see in:
-
-       (define foo A)
-       (foo 2)
-
-Or even:
-
-       (define foo A)
-       (define foo B)
-       (foo 2)
-
-don't involve any changes or sequencing in the sense we're trying to identify. As we said, these programs are just syntactic variants of (single) compound syntactic structures involving "let"s and "lambda"s.
-
-Since Scheme and OCaml also do permit imperatival constructions, they do have syntax for genuine sequencing. In Scheme it looks like this:
-
-       (begin A B C)
-
-In OCaml it looks like this:
-
-       begin A; B; C end
-
-Or this:
-
-       (A; B; C)
-
-In the presence of imperatival elements, sequencing order is very relevant. For example, these will behave differently:
-
-       (begin (print "under") (print "water"))
-       
-       (begin (print "water") (print "under"))
-
-And so too these:
-
-       begin x := 3; x := 2; x end
-
-       begin x := 2; x := 3; x end
-
-However, if A and B are purely functional, non-imperatival expressions, then:
-
-       begin A; B; C end
-
-just evaluates to C (so long as A and B evaluate to something at all). So:
-
-       begin A; B; C end
-
-contributes no more to a larger context in which it's embedded than C does. This is the sense in which functional languages have no serious notion of sequencing.
-
-We'll discuss this more as the seminar proceeds.