Re: Question about method



In article <op.s37cf4mfczmf80@frostbite>,
"Arctic Fidelity" <spam@xxxxxxxxxxxxxxxxx> wrote:

> Is there any particular advantage, either from a performance/correctness
> point of view, or a stylistic point of view, of using the following:
>
> (define (eat food)
> (define many-eat "test eat")
> (display many-eat)
> (newline))
>
> Over:
>
> (define (eat food)
> (let ((many-eat "test eat"))
> (display many-eat)
> (newline)))
>
> ?
>
> And what is the actual difference in each of these? I assume that in the
> former, that ther is no "let" enclosure, but I really don't know if I have
> any of that right.
>
> - Arctic

Stylistic. They are converted into the equivalent letrec expression.

See
http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-8.html#%25
_idx_190
.