From 5bc80f50278a294d44dc9325452f54fb5c24b142 Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Wed, 15 Sep 2010 11:57:50 -0400 Subject: [PATCH] damn tweaks13 Signed-off-by: Jim Pryor --- damn.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/damn.mdwn b/damn.mdwn index 9d03debe..b0b2d61e 100644 --- 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 @@ -250,7 +250,7 @@ It's not immediately clear how to do it with "undelimited" continuations, of the 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)`. -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 -- 2.11.0