Keisuke Nishida <[EMAIL PROTECTED]> writes:
> Hello,
>
> Is this a bug?
>
> % guile
> guile> (let loop ((foo loop)) foo)
> #<procedure loop (foo)>
>
> R5RS says <variable> is bound within <body>.
You did expect it to be bound _only_ in <body>, not in the
initialization expressions of the <bindings>, right?
According to the formal semantics in R5RS, the named let expression
above is equivalent to
(letrec ((loop (lambda (foo) foo))) (loop loop))
As you can see, the initialization expressions are evaluated in the
body of the `letrec', and `loop' is clearly bound there.
So I would say that your observation is not a bug. You can get a more
`official' answer on comp.lang.scheme, probably.