[r6rs-discuss] "Unspecified"

Sam TH samth at ccs.neu.edu
Mon Oct 2 12:20:24 EDT 2006


On Mon, 2006-10-02 at 07:32 -0700, Per Bothner wrote:
> Sam Tobin-Hochstadt wrote:
> > You are correct. My intention was to write the following:
> > 
> > (define (for-each/logging f l)
> >     (for-each (lambda (v) (let ([w (f v)]) (display w) (newline) w)) l))
> > 
> > which has the problem I was attempting to point out.
> 
> In R5RS or draft R6RS the result of set-vector! is unspecified
> anyway, so the above display is undefined.  So I don't think
> I understand your concern.

This is not correct.  The result of `vector-set!' in the R6RS draft is
"the unspecified value". (R5.91, Page 48) Therefore, the invocation of
`display' should print the external representation of the unspecified
value (#<void> in PLT Scheme, for example).

If the result of `vector-set!' was changed to be zero values, then the
program would produce and undefined result instead (R5.91, Page 50). In
PLT Scheme (and Chez), for example, passing too few values produces an
error.  

sam th




More information about the r6rs-discuss mailing list