Add let bindings

This commit is contained in:
Yiyun Liu 2025-06-06 13:59:34 -04:00
parent 4176d439e5
commit ad1ca1d796
2 changed files with 22 additions and 0 deletions

View file

@ -28,3 +28,5 @@
(check-equal? (exp-final-node (ap-exp 'S 'K 'K 3)) 3)
(check-equal? (exp-final-node (ap-exp 'K 100 99)) 100)
(check-equal? (exp-final-node `(let ((x ,(ap-exp 'S 'K 'K 3)) (y 5)) ,(ap-exp 'K 'x 'x))) 3)
(check-equal? (exp-final-node `(let ((x ,(ap-exp 'S 'K 'K 3)) (y 5)) ,(ap-exp 'K 'y 'x))) 5)