<div dir="ltr"><div><div><div><div><div>In some postfix languages, if a procedure returns multiple values, these values can be used directly as multiple arguments to another procedure call, i.e., they are &quot;spliced&quot; in the latter call.<br>

</div>In an extended Racket, this would look like this:<br></div><br>(+ (values 1 2) (values 3 4)) <br></div><div>would be equivalent to <br>(+ 1 2 3 4)<br><br></div>(map values &#39;(0 1 2) &#39;(a b c))<br><div>would return<br>

</div><div>&#39;(0 a 1 b 2 c)<br><br></div><div></div><div>(call-with-values (lambda()(my-proc ....)) list)<br>would simply be <br></div><div>(list (my-proc ....))<br><br></div><div>(values (values 1 2) (values &#39;a &#39;b))<br>

</div><div>would be equivalent to <br></div><div>(values 1 2 &#39;a &#39;b)<br><br>Correct me if I&#39;m wrong, but I think all the cases where this feature should be useful currently throws an error, so it would probably break only very little.<br>

</div><div><br></div>Such a missing feature tickles me from time to time, and I often find that Racket `values&#39; system is too cumbersome to be used more often, i.e., you need to go through stages of `call-with-values&#39;, &#39;let/define-values&#39;, `(apply values ....)&#39;, etc. and I often find myself not wanting to go down this road.<br>

<br></div><div>IMO, `values&#39; is *meant* to be the way I describe above: `values&#39; is exactly like `list&#39;, except than instead of encapsulating the values in a container, it splices them in-place.</div><br><div>

Do you see some disadvantages of using values this way?<br></div><div>For example, in some occasions, for things like<br></div><div>(define (foo x) (values x x))<br></div><div>(map + (foo &#39;(1 2 3)))<br></div><div>it may be more difficult to infer that there are actually 2 lists in the map, but to me it&#39;s just a matter of style/taste/comments/documentation, not a matter of feature.<br>

<br></div><div></div></div>Laurent<br></div>