From: jim Date: Wed, 29 Apr 2015 15:02:48 +0000 (-0400) Subject: link to code X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=aa05135baa77e4166acadc8f1a22935271a377b9;hp=f96967ad7afd646b615ffd59d521084ed3170907 link to code --- diff --git a/topics/week13_from_list_zippers_to_continuations.mdwn b/topics/week13_from_list_zippers_to_continuations.mdwn index dcd11cec..8b0b4317 100644 --- a/topics/week13_from_list_zippers_to_continuations.mdwn +++ b/topics/week13_from_list_zippers_to_continuations.mdwn @@ -215,8 +215,10 @@ and then the task would be to copy from the target `'S'` only back to the closest `'#'`. This would allow our task to simulate delimited continuations with embedded `prompt`s (also called `reset`s). + - +Here is [[some Scheme code|/code/refunctionalizing_zippers.rkt]] implementing the `tz` and `tc` functions, first as presented above, and second with the variant just mentioned, using `'#'`. There's also a third kind of implementation, which is akin to the `tc` version, but doesn't explicitly pass a `k` argument, and instead uses these unfamiliar operations `reset` and `shift`. We'll be explaining what these do shortly. (The reason this code is in Scheme is because that's the language in which it's easiest to work with operations like `reset` and `shift`.)