- changed status to resolved
letrec* evaluates incorrect order
Issue #38
resolved
Following expression is evaluated in incorrect order.
(let ()
(letrec* ((one1 (begin (display "one-1\n") '11))
(one2 (begin (display "one-2\n") '12))
(one3 (begin (display "one-3\n") '13))
(two1 (begin (display "two-1\n") '11))
(two2 (begin (display "two-2\n") '12))
(two3 (begin (display "two-3\n") '13)))
(list one1 two1)))
Expected; prints all in order and returns '(11 11)
Actual result; prints
one-1
two-1
one-2
one-3
two-2
two-3
and returns '(11 11)
Comments (3)
-
reporter -
reporter - changed status to open
The fix introduced this bug;
(define foo (lambda (form rename compare) (letrec* ((bar (lambda (a b) (cons a b))) (buzz (lambda (c d) (cons (bar c #f) d)))) (buzz grr brr))))
Above causes an error but it's totally valid.
-
reporter - changed status to resolved
Added unused lambda remove, without this caused incorrect compilation (Fixes
#38)→ <<cset 5c644ad99c83>>
- Log in to comment
Fixed letrec* evaluation order bug (Fixes
#38)→ <<cset 0957fb3360ce>>