guile-devel
[Top][All Lists]
Advanced

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

Re: JACAL, scm


From: Neil Jerram
Subject: Re: JACAL, scm
Date: 18 Oct 2001 00:37:06 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Aubrey" == Aubrey Jaffer <address@hidden> writes:

    guile> (let ((f -)) (let f ((n (f 1))) n)) ==> 1

    Aubrey> But Allegro Petrofsky, Radey, and I think it should return
    Aubrey> -1.

The error here is that Guile transforms

(let name ((var init) ...) body ...)

to

(letrec ((name (lambda (var ...) body ...)))
  (name init ...))

This is wrong, because the init's are evaluated inside the environment
that includes a binding for name.  It should instead be

((letrec ((name (lambda (var ...) body ...))) name) init ...)

Now we just need to translate that into code :-)  Anyone?

        Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]