(defn euler-5 [x]
(let [gcd (fn [x y] (if (zero? y) x (recur y (mod x y))))
lcm (fn [x y] (/ (* x y) (gcd x y)))]
(reduce lcm (range 1 (inc x)))))
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.