damn tweaks14
[lambda.git] / damn.mdwn
index 9d03deb..cd01134 100644 (file)
--- a/damn.mdwn
+++ b/damn.mdwn
@@ -159,7 +159,7 @@ But then we'd get:
 
        '((the . man) . (read . (the . ((side-effect . bad) . book))))
 
-and we said at the outset that the context `(the . (<> . book))` shouldn't need to know how to interact with affective meanings. That's precisely the problem we're trying to solve.
+and we said at the outset that the context `(the . (<> . book))` shouldn't need to know how to interact with affective meanings. (I'll use `<>` to indicate a "hole" in a larger expression.)
 
 
 Let's use continuations
@@ -199,8 +199,8 @@ We get something like this:
 Yay! The affective meaning has jumped out of the compositional evaluation of the main sentence, and the context `(the . (<> . book))` only has to deal with the trivial adjectival meaning `'id`.
 
 
-But
----
+But...
+------
 
 As came out in discussion, the `print` we're using here already constitutes a kind of side-effect mechanism of its own. If you say:
 
@@ -248,9 +248,9 @@ It's not immediately clear how to do it with "undelimited" continuations, of the
        (define damn (lambda () (call/cc (lambda (k) (cons (cons 'side-effect 'bad) (k 'id))))))
 
 
-The idea here is we capture the continuation that the thunk `(damn)` has when it gets evaluated. This continuation is bound to the variable `k`. We supply `'id` as an argument to that continuation. When the main, at-issue tree is all built, then we return a pair `((side-effect bad) AT-ISSUE-TREE)`.
+The idea here is we capture the continuation that `(damn)` has when it gets evaluated. This continuation is bound to the variable `k`. We supply `'id` as an argument to that continuation. When the main, at-issue tree is all built, then we return a pair `'((side-effect bad) AT-ISSUE-TREE)`.
 
-However, this doesn't work. The reason is that an undelimited continuation represents the future of the evaluation of `(damn)` *until the end of the computation*. So when `'id` is supplied to `k`, we go back to building the at-issue tree until we're finished *and that's the end of the computation*. We never get to go back and evaluate the context `(cons (cons 'side-effect 'bad) <>)`.
+However, this doesn't work. The reason is that an undelimited continuation represents the future of the evaluation of `(damn)` *until the end of the computation*. So when `'id` is supplied to `k`, we go back to building the at-issue tree until we're finished *and that's the end of the computation*. We never get to go back and evaluate the application of `(cons (cons 'side-effect 'bad) <>)` to anything.
 
 
 With undelimited continuations
@@ -270,7 +270,7 @@ but the behavior is the same. It's just that now our continuation doesn't stretc
 
        (reset ...)
 
-This is a kind of continuation-scope-marker. There are some interesting default behaviors if you don't explicitly specify where the limits are. But we'll be fully explicit here.
+This is a kind of continuation-scope-marker. There are some interesting default behaviors if you don't explicitly specify where the limits are. In fact, in the interactive interpreter we wouldn't need to ever explicitly mark the scopes. They'd by default be just where we want them to be. But we'll be fully explicit here.
 
 If a block `...` never invokes a shift, then `(reset ...)` will evaluate just the same as `...`. So for uniformity, we can designate our continuation-scopes even on computations that don't capture and manipulate continuations.
 
@@ -286,7 +286,7 @@ We evaluate:
                                          (cons (damn) 
                                                'book)))))
 
-Remember, the reset isn't actually *doing* anything. It's not a function that's taking the other material as an argument. It's instead a scope-marker. Here it's not even needed (and in fact in the interactive interpreter, it wouldn't even be needed when we invoke continuations, because of the default position it takes).  But we're inserting it to be explicit and uniform.
+Remember, the reset isn't actually *doing* anything. It's not a function that's taking the other material as an argument. It's instead a scope-marker. Here it's not even needed; but we're inserting it anyway to be explicit and uniform.
 
 Evaluating that gives us: