mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-03 05:20:16 +02:00
(Dynamic Wind): Untabify.
(Multiple Values): Use @result. Reported by Stephen Compall <s11@member.fsf.org>.
This commit is contained in:
parent
83dbedccdb
commit
54148bb85a
1 changed files with 18 additions and 17 deletions
|
@ -345,11 +345,12 @@ of the call to @code{call-with-values}.
|
||||||
@example
|
@example
|
||||||
(call-with-values (lambda () (values 4 5))
|
(call-with-values (lambda () (values 4 5))
|
||||||
(lambda (a b) b))
|
(lambda (a b) b))
|
||||||
==> 5
|
@result{} 5
|
||||||
|
|
||||||
@end example
|
@end example
|
||||||
@example
|
@example
|
||||||
(call-with-values * -) ==> -1
|
(call-with-values * -)
|
||||||
|
@result{} -1
|
||||||
@end example
|
@end example
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -791,23 +792,23 @@ times.
|
||||||
(define x 'normal-binding)
|
(define x 'normal-binding)
|
||||||
@result{} x
|
@result{} x
|
||||||
(define a-cont (call-with-current-continuation
|
(define a-cont (call-with-current-continuation
|
||||||
(lambda (escape)
|
(lambda (escape)
|
||||||
(let ((old-x x))
|
(let ((old-x x))
|
||||||
(dynamic-wind
|
(dynamic-wind
|
||||||
;; in-guard:
|
;; in-guard:
|
||||||
;;
|
;;
|
||||||
(lambda () (set! x 'special-binding))
|
(lambda () (set! x 'special-binding))
|
||||||
|
|
||||||
;; thunk
|
;; thunk
|
||||||
;;
|
;;
|
||||||
(lambda () (display x) (newline)
|
(lambda () (display x) (newline)
|
||||||
(call-with-current-continuation escape)
|
(call-with-current-continuation escape)
|
||||||
(display x) (newline)
|
(display x) (newline)
|
||||||
x)
|
x)
|
||||||
|
|
||||||
;; out-guard:
|
;; out-guard:
|
||||||
;;
|
;;
|
||||||
(lambda () (set! x old-x)))))))
|
(lambda () (set! x old-x)))))))
|
||||||
|
|
||||||
;; Prints:
|
;; Prints:
|
||||||
special-binding
|
special-binding
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue