Functional Programming in Scheme Name binding, Recursion, Iteration, and Continuations
Introduction and motivation
We start by motivating our interest in continuations. One part of the story is the
usefulness of a mechanism that allows us to 'jump out of a deep subexpression'. Another
part is the possibility of controlling and manipulating the 'remaining part of the calculation'
relative to some given control point.
It is sometimes necessary to escape from a deep expression, for instance in an exceptional case
We are interested in a primitive which allows us to control the remaining part of a calculation - a so-called continuation.
Exit or exception mechanism:
The need to abandon some deep evaluation
Capturing of continuations
Exploring new control mechanisms by use of continuations
Scheme support first class continuations dressed as functions