Re: Difference letrec environment binding (again)

2011-11-10 Thread Hans Aberg
On 10 Nov 2011, at 00:11, Andy Wingo wrote: On Thu 04 Aug 2011 10:56, Hans Aberg haber...@telia.com writes: I try to understand how Guile transforms 'letrec' (returning to the topic of an earlier post on this list). `letrec' is translated to various things, some of which are not Scheme.

Re: Difference letrec environment binding (again)

2011-11-09 Thread Andy Wingo
On Thu 04 Aug 2011 10:56, Hans Aberg haber...@telia.com writes: I try to understand how Guile transforms 'letrec' (returning to the topic of an earlier post on this list). `letrec' is translated to various things, some of which are not Scheme. As Ludo notes, see the Fixing Letrec paper by

Re: Difference letrec environment binding (again)

2011-08-25 Thread Hans Aberg
Just FYI, I found a source saying that R5RS defines (though I could not find it there) 'letrec' via this transformation (which also answers my question): (letrec ([x1 e1] ... [xn en]) body) ~ (let ([x1 undefined] ... [xn undefined]) (let ([t1 e1] ... [tn en]) (set! x1 t1)

Re: Difference letrec environment binding (again)

2011-08-21 Thread Ludovic Courtès
Hello! Hans Aberg haber...@telia.com skribis: So letrec is transformed to something else. What might that be? I believe you’re seeing the “Fixing letrec” algorithm in action (see the paper of that name by Dybwig et al.) Thanks, Ludo’.

Difference letrec environment binding (again)

2011-08-04 Thread Hans Aberg
I try to understand how Guile transforms 'letrec' (returning to the topic of an earlier post on this list). Define (define (a) (letrec ( (even? (lambda (n) (if (zero? n) #t (odd? (- n 1) (odd? (lambda (n) (if (zero? n) #f (even? (- n 1)) (even? 1000))) (define (b) ((lambda