Last active
November 3, 2015 08:13
-
-
Save dd1994/d10147d972bd23e47447 to your computer and use it in GitHub Desktop.
get greatest common divisor(use Clojure)
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
(defn gcd | |
[div rem] | |
(if (= rem 0) | |
div | |
(gcd rem (mod div rem)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment