Hi Alex,
> as the last _expression_ [of an `and' _expression_] is in tail
On Sun 06 Jan 2013 03:34, Alex Shinn <alexshinn@x> writes:
> On Sun, Jan 6, 2013 at 4:31 AM, Andy Wingo <wingo@x> wrote:
>
> context, the _values_ of the last _expression_ are returned. SameI agree it's probably a mistake in practice, but I think that there's no
> with `or', `when', and `unless'.
>
> Pluralized for `and'. I'm not sure about `or' - I think it would
> always be a mistake to use MVs in an or _expression_.
way you can avoid reducing (or #f (foo)) to (foo) -- and in that case
all values returned from the call to (foo) are returned.
I used to agree with you, but requiring the consequent to be in tail
> Contrary to their specifications and the "differences from r6rs"
> appendix, the return value of `when' and `unless' is indeed
> specified if
> the body is evaluated, as the body is in tail position.
>
>
> No, this was a mistake on R6RS's part. It is meaningless
> to return values from `when' or `unless', so we explicitly state
> that "the result of the when/unless _expression_ is unspecified."
position means that the last _expression_ is evaluated in the continuation
of the "when" _expression_ as a whole. I don't think you can get around
this with a special "this is unspecified" exception -- you've already
specified it. Is there any definition other than (if TEST (begin
CONSEQUENT ...)) that actually fits the requirements?
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports