[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can array-ref return (values ...) ?

> > I'm trying to put together an implementation of arrays that will
> > serve my current purposes.  At one point, I basically wanted
> > 
> > (array-ref a i j k ...)
> > 
> > to return (values ...).
> > 
> > So I looked at this SRFI and it doesn't seem that this is a real
> > problem (OK, it would be a problem with array-set!, but perhaps one
> > wants read-only arrays without array-set! to be possible.)
> 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?  (I find it interesting that you used the word "contents"
rather than "content".  Either would be correct, of course.)  Can it be
(values a b)?  If not, why not?  And if not, perhaps it should be
documented to be not possible.