Skip to content

Instantly share code, notes, and snippets.

@dd1994
Last active November 3, 2015 08:13
Show Gist options
  • Save dd1994/d10147d972bd23e47447 to your computer and use it in GitHub Desktop.
Save dd1994/d10147d972bd23e47447 to your computer and use it in GitHub Desktop.
get greatest common divisor(use Clojure)
(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