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

Re: can (values) be the (an) unspecified value?



> I was under the impression that we all agree that non-final forms in a
> begin (or implicit begin) can deliver any number of values, e.g.
> (begin (values) (values 1 2 3) 7) is OK, ...

Jonathan's recollection on the disposition of continuations of
non-final forms in begin's is the same as mine.  However, I
explicitly remember that we decided that forms returning an
unspecified value must return exactly one value.  In particular, 

	(call-with-values
          (lambda () (set! x 3))
          (lambda () 3))

is an error, but

	(call-with-values
          (lambda () (set! x 3))
          (lambda (x) 3))

is okay.  I do not remember the reasons for such a decision.

By the way, the first expression generates an error in Scheme-48, but
not the second one.

John