[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple values for R4RS.
I cannot figure out what some of you would like me to conclude from
your responses. My premise is that VALUES and APPLY-VALUES as defined
reflect existing practice in some Scheme dialects, are useful, and are
non-controversial enough to add to R4RS. Let me suggest some
questions to answer which may help clear up my confusion.
 Do you think VALUES and APPLY-VALUES as defined are controversial?
(I understand CPH's view on this issue).
 Do you think VALUES and APPLY-VALUES as defined reflect existing
practice? For example, in T, VALUES = RETURN, and APPLY-VALUES =
(LAMBDA (X Y) (RECEIVE-VALUES Y X)), and MIT Scheme has the
 Do you think VALUES and APPLY-VALUES as defined prohibit the
future inclusion of ACCEPTS? or some other proposal to deal with
 Do you believe VALUES and APPLY-VALUES should be excluded from
Scheme solely because there is no agreement on how to deal with
---- Amended multiple values proposal.
(values obj ...) essential procedure
Returns 0 or more values to a receiving procedure (See apply-values).
(values) => returns zero (no) values
(values 1) => returns a single value, 1
(values 1 'a) => returns two values, 1 and the symbol a
(apply-values generator receiver) essential procedure
Returns the result of applying the procedure 'receiver' to the values
produced by calling procedure 'generator' with no arguments. It is an
error if 'receiver' cannot be applied to the number of values returned
by 'generator' or if 'generator' cannot be called with zero arguments.
(values 1 2))
cons) => (1 . 2)