diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2022-11-07 15:13:04 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2022-11-07 16:48:05 +0200 |
commit | 6c0c8fb05214d1cf631f5aad657e38195ae88c95 (patch) | |
tree | d7eddf833b6494b7dcbeb6e87bdef53b18f01f53 | |
parent | 51e22a9a559a9961f43875c68f099540ffae0c6d (diff) | |
download | gcd-6c0c8fb05214d1cf631f5aad657e38195ae88c95.tar.gz |
Clojure: use recur
-rw-r--r-- | gcd.clj | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12,7 +12,7 @@ (defn gcd2 [a b] (if (zero? b) a - (gcd2 b (mod a b)))) + (recur b (mod a b)))) (defn gcdn [aa] (reduce gcd2 aa)) |