svn: r6919
This commit is contained in:
Eli Barzilay 2007-07-15 06:39:12 +00:00
parent 8196473712
commit 7503586cea

View File

@ -34,9 +34,10 @@
;; Multiple values are problematic: MzScheme promises can use multiple ;; Multiple values are problematic: MzScheme promises can use multiple
;; values, but to carry that out `call-with-values' should be used in all ;; values, but to carry that out `call-with-values' should be used in all
;; places that deal with multiple values, which will make the whole thing ;; places that deal with multiple values, which will make the whole thing
;; much slower -- but multiple values are rarely used (spceifically, students ;; much slower (about twice in tight loops) -- but multiple values are rarely
;; never use them). Instead, `values' is redefined to produce a first-class ;; used (spceifically, students never use them). So `values' is redefined to
;; tuple-holding struct, and `split-values' turns that into multiple values. ;; produce a first-class tuple-holding struct, and `split-values' turns that
;; into multiple values.
(define-struct multiple-values (values)) (define-struct multiple-values (values))
(define (split-values x) (define (split-values x)
(let ([x (! x)]) (let ([x (! x)])