Introduction to Delimited Continuations/Handling the continuation

Now we can start to do some neat things with the continuation. There's no reason that  has to be invoked from within the   block. Maybe we don't want to wait for the user to input a line of text, or maybe we don't even know when or from where the input will come. In either case, we can put the continuation off to the side, so we can invoke it by some other means.

Invoking  will stick the continuation (which in this case is everything after the   block -- a function which takes a   and prints a message to the console) into the variable , which we can invoke later (eg from the REPL, another function, etc.).


 * Next Lesson
 * Course Home Page