Lecture overview -- Keyboard shortcut: 'u'  Previous page: A catch and throw example -- Keyboard shortcut: 'p'  Next page: Being more precise -- 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 36 : 42
Functional Programming in Scheme
Name binding, Recursion, Iteration, and Continuations
The intuition behind continuations

A continuation of the evaluation of an expression E in a surrounding context C represents the future of the computation, which waits for, and depends on, the value of E

Context C and expression E

Intuitive continuation of E in C

(+ 5 (* 4 3))
The adding of 5 to the value of E
(cons 1 (cons 2 (cons 3 '())))
The consing of 3, 2 and 1 to the value of E
(define x 5)
(if (= 0 x)
    'undefined
    (remainder (* (+ x 1) (- x 1)) x))
The multiplication of E by x - 1 followed by a division by x

An intuitive understanding of continuations of an expression in some context.