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.
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
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)
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’.
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