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
;; 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
;; much slower -- but multiple values are rarely used (spceifically, students
;; never use them). Instead, `values' is redefined to produce a first-class
;; tuple-holding struct, and `split-values' turns that into multiple values.
;; much slower (about twice in tight loops) -- but multiple values are rarely
;; used (spceifically, students never use them). So `values' is redefined to
;; produce a first-class tuple-holding struct, and `split-values' turns that
;; into multiple values.
(define-struct multiple-values (values))
(define (split-values x)
(let ([x (! x)])