fix to handle multiple value return

This commit is contained in:
Sam Tobin-Hochstadt 2010-04-21 16:55:30 -04:00
parent 457a6c16c3
commit 49a42fd089

View File

@ -15,7 +15,9 @@
(let ([e (with-handlers ([values (lambda (exn)
(printf "~a raised exception ~a~n" 'f exn)
(raise exn))])
(apply f l))])
(printf "~a result was ~a~n" 'f e)
e)))]
(call-with-values (lambda () (apply f l)) list))])
(if (and (pair? e) (null? (cdr e)))
(printf "~a result was ~a~n" 'f (car e))
(printf "~a results were ~a~n" 'f e))
(apply values e))))]
[(_ f . args) (debug (f . args))]))