Skip to content

Commit e19559a

Browse files
committed
Test letrec with non-tail-calls.
1 parent ca128e7 commit e19559a

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

www/notes/loot/test/compile.rkt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,18 @@
131131
(cons (λ (x) (sub1 x))
132132
'())))))
133133
'(1 -1))
134+
135+
(check-equal? (run
136+
'(let ((id (λ (x) x)))
137+
(letrec ((even?
138+
(λ (x)
139+
(if (zero? x)
140+
#t
141+
(id (odd? (sub1 x))))))
142+
(odd?
143+
(λ (x)
144+
(if (zero? x)
145+
#f
146+
(id (even? (sub1 x)))))))
147+
(even? 101))))
148+
#f)

0 commit comments

Comments
 (0)