X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek13_from_list_zippers_to_continuations.mdwn;h=8b0b43173e76db93320a3e6bbf606eb14f74b5a9;hp=dcd11cec2181b4b98f37477e0fbd693ba889a7fa;hb=a57131771bf2f69f35614eb4b41cc43bf00540a2;hpb=f2cc7617f047ea928629ebc8f880b54539da4e1c 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`.)