Introduction to Delimited Continuations

Summary edit

A delimited continuation is a representation of the "rest of a program" from the current program counter up to a designated boundary[1]. It has been described as a "functional GOTO", and can be a useful mechanism for managing the control flow of a program.

This learning project walks the student through the theory, syntax, and usage of delimited continuations in the Scala[2] programming language.

Lessons edit

  Completion status: Almost complete, but you can help make it more thorough.
  1. The second program ever
  2. A hidden continuation
  3. The rest of the program
  4. Using shift and reset
  5. Handling the continuation
  6. Hiding the shift
  7. Embedded shifts
  8. In action

References edit