Disabled external gits
This commit is contained in:
13
cs420-acc/l3-compiler/tests/expr-letrec.l3
Normal file
13
cs420-acc/l3-compiler/tests/expr-letrec.l3
Normal file
@@ -0,0 +1,13 @@
|
||||
;; In Emacs, open this file in -*- Scheme -*- mode
|
||||
|
||||
;; Test the "letrec" expression
|
||||
|
||||
(@byte-write 66)
|
||||
|
||||
(letrec ((fact (fun (x) (if (@= 0 x) 1 (@* x (fact (@- x 1)))))))
|
||||
(@byte-write (@- (fact 5) 55)))
|
||||
(letrec ((even? (fun (x) (if (@= x 0) #t (odd? (@- x 1)))))
|
||||
(odd? (fun (x) (if (@= x 0) #f (even? (@- x 1))))))
|
||||
(if (even? 66)
|
||||
(@byte-write 66)
|
||||
(@byte-write 63)))
|
Reference in New Issue
Block a user