diff --git a/src/ex/q064.clj b/src/ex/q064.clj new file mode 100644 index 0000000..d2ad1a9 --- /dev/null +++ b/src/ex/q064.clj @@ -0,0 +1,8 @@ +;; https://4clojure.oxal.org/#/problem/064 + +(ns ex.q064) + +(defn ans + "Problem 64, Intro to Reduce" + [] + +) \ No newline at end of file diff --git a/test/ex/q064_test.clj b/test/ex/q064_test.clj new file mode 100644 index 0000000..c6407f0 --- /dev/null +++ b/test/ex/q064_test.clj @@ -0,0 +1,11 @@ +;; https://4clojure.oxal.org/#/problem/064 + +(ns ex.q064-test + (:require [clojure.test :as t] + [ex.q064 :as sut])) + +(t/deftest test-q64 + (t/testing "Problem 64, Intro to Reduce" + (t/is (= 15 (reduce (sut/ans) [1 2 3 4 5]))) + (t/is (= 0 (reduce (sut/ans) []))) + (t/is (= 6 (reduce (sut/ans) 1 [2 3]))))) \ No newline at end of file