/[guile]/guile/guile-core/doc/ref/scheme-control.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/scheme-control.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by kryde, Sun May 11 22:37:40 2003 UTC revision 1.10 by kryde, Wed Jul 23 23:53:39 2003 UTC
# Line 345  of the call to @code{call-with-values}. Line 345  of the call to @code{call-with-values}.
345  @example  @example
346  (call-with-values (lambda () (values 4 5))  (call-with-values (lambda () (values 4 5))
347                    (lambda (a b) b))                    (lambda (a b) b))
348                                               ==>  5  @result{} 5
349    
350  @end example  @end example
351  @example  @example
352  (call-with-values * -)                             ==>  -1  (call-with-values * -)
353    @result{} -1
354  @end example  @end example
355  @end deffn  @end deffn
356    
# Line 791  times. Line 792  times.
792  (define x 'normal-binding)  (define x 'normal-binding)
793  @result{} x  @result{} x
794  (define a-cont  (call-with-current-continuation  (define a-cont  (call-with-current-continuation
795                    (lambda (escape)                    (lambda (escape)
796                       (let ((old-x x))                       (let ((old-x x))
797                         (dynamic-wind                         (dynamic-wind
798                            ;; in-guard:                            ;; in-guard:
799                            ;;                            ;;
800                            (lambda () (set! x 'special-binding))                            (lambda () (set! x 'special-binding))
801    
802                            ;; thunk                            ;; thunk
803                            ;;                            ;;
804                            (lambda () (display x) (newline)                            (lambda () (display x) (newline)
805                                       (call-with-current-continuation escape)                                       (call-with-current-continuation escape)
806                                       (display x) (newline)                                       (display x) (newline)
807                                       x)                                       x)
808    
809                            ;; out-guard:                            ;; out-guard:
810                            ;;                            ;;
811                            (lambda () (set! x old-x)))))))                            (lambda () (set! x old-x)))))))
812    
813  ;; Prints:  ;; Prints:
814  special-binding  special-binding

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26