-
-
Save dakusui/74898eb4289d0dae46ef to your computer and use it in GitHub Desktop.
Tak for mal
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! tak | |
(fn* [x y z] | |
(if (<= x y) | |
z | |
(tak (tak (- x 1) y z) | |
(tak (- y 1) z x) | |
(tak (- z 1) x y))))) | |
(println (tak 24 16 8)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment