Skip to content

Commit 174b088

Browse files
committed
Add tri test.
1 parent 49f1436 commit 174b088

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

www/notes/loot/test/compile.rkt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,16 @@
8484
(check-equal? (run '((λ (f) (f (f 0))) (λ (x) (add1 x)))) 2)
8585
(check-equal? (run '((let ((y 8)) (car (cons (λ (x) y) '()))) 2)) 8)
8686
(check-equal? (run '(let ((y 8)) ((car (cons (λ (x) y) '())) 2))) 8)
87+
(check-equal?
88+
(run
89+
'(((λ (t)
90+
((λ (f) (t (λ (z) ((f f) z))))
91+
(λ (f) (t (λ (z) ((f f) z))))))
92+
(λ (tri)
93+
(λ (n)
94+
(if (zero? n)
95+
1
96+
(+ n (tri (sub1 n)))))))
97+
10))
98+
56)
99+

0 commit comments

Comments
 (0)