Your uses of values are covered in apply/map/append/list trickeries.
Using values might be more elegant, but yes, it's currently not possible.
____________________ Racket Users list: http://lists.racket-lang.org/users
3.7. Add LAMBDA*. Not adopted. The main objection seemed to be thatthis proposal requires a new kind of stored value (multiple values) thateither is not an expressed value or does not behave like other expressedvalues.3.8. Multiple return values. Not adopted. Debate centered on whetherreturning a single "multiple value" should be equivalent to returningthat value normally. A secondary issue concerned whether extra returnvalues should be ignored or an error. We approached consensus on this.After much debate it was decided to go on to other issues and letDybvig and Hanson discuss the matter in private. Their discussionlater that night led to a conclusion that we don't understand theissues well enough to charge ahead with either proposal 3.7 or 3.8or a variation.3.9. Optional arguments. Not considered, as it was felt that thiswould be a more controversial issue than proposal 3.8 on which we hadjust spent a great deal of time.
Then why not return lists instead of values?
J. Michael Ashley and R. Kent Dybvig. An efficient implementation of multiple return values in Scheme. In Proceedings of the 1994 ACM Conference on Lisp and Functional Programming, 140-149, June 1994. Describes Chez Scheme's implementation of the Scheme multiple return values interface.
Hi Jay,
So what about keyword return values?
Both because of symmetry and because getting three return values straight is just as hard as getting three arguments straight.
Stephan Houben
>> Then why not return lists instead of values?
> Error checking.
Although nowadays we have match-define and friends.
(define-values (a b c) (return-3-values))
(match-define (list a b c) (return-3-element-list))
Both would error appropriately.