I think they should reject empty bodies. What's the point of going through all that binding and then just returning something useless.
On 2020-07-16 13:45 -0400, John Cowan wrote:
> > If this is what is expected, I think the SRFI
> > should indicate that "<body> is a sequence of zero or more definitions
> > followed by one or more expressions".
>
> My point is that people familiar with Scheme specifications will already
> know that. It's not actually defined in one place in R[57]RS, but it
> appears repeatedly in the definitions of let, let*, etc. So I think people
> will not be surprised if either-guard fails because they have not provided
> at least one expression.
I had the very same thought. Then the sample implementation of
either-guard behaves as expected.
On the other hand, the -let*(-values) forms accept empty bodies
(as an artifact of their origin in SRFI 2); in this case, they return
a Just / Right of an unspecified value. If it seems important enough,
I'll change the implementation of these forms to reject empty bodies.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"The composer makes plans, music laughs." --Morton Feldman