Created
December 27, 2014 08:05
-
-
Save tmathmeyer/5d4789de025ad2a163a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(#def pow (x y) | |
(if (= 0 y) 1 | |
(if (= y 1) x | |
(* x (pow x (- y 1)))))) | |
(print (pow 3 4)) | |
(#def begin (x y) y) | |
(#def mut1 (x) | |
(begin (print x) | |
(mut2 (+ x 1)))) | |
(#def mut2 (x) | |
(if (= 0 x) 0 (mut1 (- x 2)))) | |
(mut2 (pow 4 4)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment