In R5RS and R6RS, call-with-values takes two arguments, both procedures. The first is a producer of multiple values; the second is a consumer, to which the multiple values returned by producer are passed as arguments.
I propose allowing multiple producer arguments. This gives call-with-values the same power as Common Lisp multiple-value-call.
WG1 voted to reject multiple producers.
As an example, imagine an implementation of (physical) vectors, called vecs, using multiple values. To create a vec, we use make-vec, defined thus:
(define (make-vec x y z) (values x y z))Then we can add vecs as follows:
(define (vec+ x1 y1 z1 x2 y2 z2) (make-vec (+ x1 y1) (+ x2 y2) (+ x3 y3))) (define-syntax vecplus () (syntax-rules ((vecplus a b) (call-with-values a b vec+)))) (vecplus (make-vec 1 2 3) (make-vec 4 5 6) => 5 7 9Cross product, dot product, and so on can be implemented in the same style. In Scheme implementations where multiple values are put on the stack, this allows operations on vecs without boxing or unboxing them.