Lecture overview -- Keyboard shortcut: 'u'  Previous page: Continuations [Section] -- Keyboard shortcut: 'p'  Next page: The catch and throw idea -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home    Lecture 3 - Page 33 : 42
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

  • Continuation

    • Capturing of continuations

    • Exploring new control mechanisms by use of continuations

Scheme support first class continuations dressed as functions