[racket] Implementing delimited continuations using a CPS transform
I think your solution is perfectly sensible.
shift/reset needs two CPS transformations. Then you have two
continuations : one local (up to the next reset), one global
(from the next reset to the toplevel). The global one is usually
called the meta-continuation, and often denoted m.
I think this is explained in "Abstracting Control" by Filinski and Danvy.
This blog post shows an evaluator for shift/reset where you can see
the two continuations at work:
http://calculist.blogspot.com/2006/11/shift-and-reset-via-two-continuations.html
Best regards,
Nicolas.