[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can array-ref return (values ...) ?
> Brad Lucier <lucier@xxxxxxxxxxxxxxx> writes:
> > > I don't understand. Array-ref by me returns the contents of a single
> > > element, so that would be just (values v) which is just v.
> > Yes, it returns the contents of a single element, but what are the contents
> > of a single element? ... Can it be
> > (values a b)? If not, why not?
> No. Because (values ...) is not a data constructor. It is a special
> syntax that explicitly applies its arguments to the current
> continuation [see the recent messages on cls under the TCO thread].
In R5RS, (values ...) is a procedure.
> > And if not, perhaps it should be
> > documented to be not possible.
> OK. Except that it's really not possible because of R5RS.
R5RS has nothing at all to say about arrays (or many other things).
So we are free to use our imagination, if we wish.
And if we don't wish to do so, that's OK, too.