[racket] Implementing delimited continuations using a CPS transform

From: nicolas.oury at gmail.com (nicolas.oury at gmail.com)
Date: Thu Nov 24 07:15:53 EST 2011

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:


Best regards,


Posted on the users mailing list.