diff options
author | Kevin Ryde <user42@zip.com.au> | 2006-10-09 22:47:06 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2006-10-09 22:47:06 +0000 |
commit | 40296bab814a677dd0e9a09bdf93be2e9ccd3fd0 (patch) | |
tree | 386d259e813c9e4fd467417055a65cc295e024b4 /doc/ref/api-control.texi | |
parent | aeb9d8e054a250c1f56d90f281590e8f8688c35f (diff) | |
download | guile-40296bab814a677dd0e9a09bdf93be2e9ccd3fd0.tar.gz |
merge from 1.8 branch
Diffstat (limited to 'doc/ref/api-control.texi')
-rw-r--r-- | doc/ref/api-control.texi | 39 |
1 files changed, 20 insertions, 19 deletions
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: |