[plt-scheme] Understanding continuations
On 23 Jul, 2008, at 07:35, Filipe Cabecinhas wrote:
> (lambda (argument) ;; Continuation that just returns to the toplevel
> ((lambda (other-argument) ;; Call to plus with the result of foo
> (+ 1 2 3 other-argument))
> ((lambda (inner-argument) ;; the rest of the foo function
> inner-argument
> 13))))
Of course I should pass the argument to the rest of the foo function:
(lambda (argument) ;; Continuation that just returns to the toplevel
((lambda (other-argument) ;; Call to plus with the result of foo
(+ 1 2 3 other-argument))
((lambda (inner-argument) ;; the rest of the foo function
inner-argument
13)
argument)))
- Filipe Cabecinhas