next up previous
Next: 12.6 J Example Up: 12 Recursion Previous: 12.4 Continuations

12.5 Scheme Example

Suppose e is the expression (* 2 (+ 3 4)) and f is the subexpression (+ 3 4), then the continuation of f in e is

(lambda(n) (* 2 n))

and

((lambda(n) (* 2 n)) (+ 3 4))

produces the same result of 14 as does

(* 2 (+ 3 4))


next up previous
Next: 12.6 J Example Up: 12 Recursion Previous: 12.4 Continuations
2002-11-26