From 40296bab814a677dd0e9a09bdf93be2e9ccd3fd0 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Mon, 9 Oct 2006 22:47:06 +0000 Subject: merge from 1.8 branch --- doc/ref/api-control.texi | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'doc/ref/api-control.texi') diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index dbb51cf6f..11a276a13 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -1234,28 +1234,29 @@ non-locally, @var{out_guard} is called. If the dynamic extent of the dynamic-wind is re-entered, @var{in_guard} is called. Thus @var{in_guard} and @var{out_guard} may be called any number of times. + @lisp (define x 'normal-binding) @result{} x -(define a-cont (call-with-current-continuation - (lambda (escape) - (let ((old-x x)) - (dynamic-wind - ;; in-guard: - ;; - (lambda () (set! x 'special-binding)) - - ;; thunk - ;; - (lambda () (display x) (newline) - (call-with-current-continuation escape) - (display x) (newline) - x) - - ;; out-guard: - ;; - (lambda () (set! x old-x))))))) - +(define a-cont + (call-with-current-continuation + (lambda (escape) + (let ((old-x x)) + (dynamic-wind + ;; in-guard: + ;; + (lambda () (set! x 'special-binding)) + + ;; thunk + ;; + (lambda () (display x) (newline) + (call-with-current-continuation escape) + (display x) (newline) + x) + + ;; out-guard: + ;; + (lambda () (set! x old-x))))))) ;; Prints: special-binding ;; Evaluates to: -- cgit v1.2.3