
Next: Sharing
Up: Donkey's Scheme
Previous: Local
When evaluating call/cc Donkey does several things:
-
Donkey saves the current context which is exactly the text within
the evaluation area with the hole replacing the call to
call/cc. The hole of the context is represented by
an empty square. Note that if you wish to hide the context (because
it takes too much space) just click on its text. Donkey hides by
default, but you can change this in the preferences menu
(Section 4.3).
-
The continuation returned by call/cc is given a name of the
form c<number> and is placed in the Lifted Defs menu
(Section 4.5). The value of the continuation is
always expressed by its name and its associated context.
-
From this point, the continuation is displayed as its name, and
whenever it appears in a intermediate expression, its context is
displayed at the top of the evaluation area.
When a continuation is applied, the current context is replaced by the
continuations context with the application's argument filling the
hole In Figure 2, for an example, after the next step,
the intermediate expression will be:
Figure 2: An example using call/cc
PLT