[plt-scheme] Please help test version 359.100

From: Sam TH (samth at ccs.neu.edu)
Date: Tue Nov 14 13:14:49 EST 2006

On Tue, 2006-11-14 at 18:54 +0100, hufflen jean-michel wrote:
> >From hufflen at lifc.univ-fcomte.fr  Tue Nov 14 18:11:42 2006
> >(...)
> 
> >   The notion of *unspecified value* is ambiguous. It may be:
> >   - any value, possibly chosen randomly,
> >   - no value, or (why not?) several values as Scheme functions may return
> >multiple values.
> 
>    After checking, the situation is more ambiguous than I was thinking. Let us
> consider:
> 
> [0] (for-each write '())
> [1] (define checking-for-each (for-each write '()))
> [2] (define checking-zero-value (values))
> [3] checking-for-each
> [4] checking-zero-value
> [5] (eq? checking-for-each (for-each write '()))
> 
>    PLT accepts [0], [1], but not [2], although [0] and [1] do not result in a
> value. [3] yields the same as [1], that is, no value. [5] yields "#t".  That
> is, unspecified values sometimes behave like a single value, even if there are
> no such.

You are mistaking the value #<void>, which the printer omits when it is
the only value returned, for a lack of values.  Thus the following:

> (values)
> (void)
> (equal? (void) (void))
#t
> (equal? (void) (values))
context expected 1 value, received 0 values


sam th



Posted on the users mailing list.