6 lines
129 B
Clojure
6 lines
129 B
Clojure
(defn gcd
|
|
"(gcd a b) computes the greatest common divisor of a and b."
|
|
[a b]
|
|
(if (zero? b)
|
|
a
|
|
(recur b (mod a b))))
|