X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment10.mdwn;h=ec3b8c1494b80fed9f6e6485d253d6452f679c15;hp=c1a84d3b531f17b2520b296d6654cae6f63c5baf;hb=5f33785abbd5a337eec0d5ebcd19349d0d7c3721;hpb=aff0f61f1bb313ca717c02334eacfc2dbdfb51cb diff --git a/assignment10.mdwn b/assignment10.mdwn index c1a84d3b..ec3b8c14 100644 --- a/assignment10.mdwn +++ b/assignment10.mdwn @@ -112,7 +112,21 @@ (insert-co new before after (cdr lst) (lambda (new-lst lefts rights) ________)))))) -6. Go back to the "abSd" problem we presented in [[From List Zippers to Continuations]]. Consider the "tc" solution which uses explicitly passed continuations. Try to reimplement this using reset and shift instead of having an explicit `k` argument. This will likely be challenging but rewarding. The notes on [[CPS and Continuation Operators]], especially the examples at the end, should be helpful. We are of course also glad to help you out. +6. Go back to the "abSd" problem we presented in [[From List +Zippers to Continuations]]. Consider the "tc" solution which uses +explicitly passed continuations. Try to reimplement this using reset +and shift instead of having an explicit `k` argument. This will likely +be challenging but rewarding. The notes on [[CPS and Continuation +Operators]], especially the examples at the end, should be helpful. We +are of course also glad to help you out. + + Consider adding a special symbol `'#'` (pronounced 'prompt') to the + mini-language such that + + `"ab#cdSef"` ~~> `"abcdcdef"` + + That is, the rule for `'S'` is to copy the preceding string, but + only up to the closest enclosing `'#'` symbol. 7. Can you reimplement your solution to [[assignment9]] using reset and shift?