From 0b0c13b1cdf0427f604ff3e1df8963df7237a527 Mon Sep 17 00:00:00 2001
From: Igor Pashev <pashev.igor@gmail.com>
Date: Sat, 15 Jul 2017 22:46:01 +0300
Subject: Clojure

---
 gcd.clj | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 gcd.clj

diff --git a/gcd.clj b/gcd.clj
new file mode 100644
index 0000000..7cee3c3
--- /dev/null
+++ b/gcd.clj
@@ -0,0 +1,22 @@
+; SYNOPSIS:
+;
+; $ clojure gcd.clj 11 22 33 121
+; 11
+;
+; or:
+;
+; $ java -cp clojure-1.8.0.jar clojure.main gcd.clj 11 22 33 121
+; 11
+;
+
+(defn gcd2 [a b]
+  (if (zero? b)
+    a
+    (gcd2 b (mod a b))))
+
+(defn gcdn [aa] (reduce gcd2 aa))
+
+(println
+  (gcdn
+    (map #(Integer/parseInt %) *command-line-args*)))
+
-- 
cgit v1.2.3