Skip to content

Instantly share code, notes, and snippets.

@stingh711
Created September 4, 2012 08:37
Show Gist options
  • Select an option

  • Save stingh711/3618571 to your computer and use it in GitHub Desktop.

Select an option

Save stingh711/3618571 to your computer and use it in GitHub Desktop.
Project euler issue 5 solution in clojure
(defn gcd
[a b]
(if (zero? b)
a
(gcd b (rem a b))))
(reduce (fn [a b] (/ (* a b) (gcd a b))) (range 1 21))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment