diff --git a/src/ex/q068.clj b/src/ex/q068.clj new file mode 100644 index 0000000..7989d3a --- /dev/null +++ b/src/ex/q068.clj @@ -0,0 +1,8 @@ +;; https://4clojure.oxal.org/#/problem/068 + +(ns ex.q068) + +(defn ans + "Problem 68, Recurring Theme" + [] + [7 6 5 4 3]) \ No newline at end of file diff --git a/test/ex/q068_test.clj b/test/ex/q068_test.clj new file mode 100644 index 0000000..4830d35 --- /dev/null +++ b/test/ex/q068_test.clj @@ -0,0 +1,17 @@ +;; https://4clojure.oxal.org/#/problem/068 + +(ns ex.q068-test + (:require [clojure.test :as t] + [ex.q068 :as sut])) + +(defn question + [] + (loop [x 5 + result []] + (if (> x 0) + (recur (dec x) (conj result (+ 2 x))) + result))) + +(t/deftest test-q68 + (t/testing "Problem 68, Recurring Theme" + (t/is (= (question) (sut/ans))))) \ No newline at end of file