From d467425ec4e0e577c7b4d6f3e825aff08cf20e10 Mon Sep 17 00:00:00 2001 From: David Kun Date: Fri, 19 Jul 2024 21:04:07 -0400 Subject: [PATCH] Add q9 --- src/ex/q009.clj | 8 ++++++++ test/ex/q009_test.clj | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/ex/q009.clj create mode 100644 test/ex/q009_test.clj diff --git a/src/ex/q009.clj b/src/ex/q009.clj new file mode 100644 index 0000000..466fac5 --- /dev/null +++ b/src/ex/q009.clj @@ -0,0 +1,8 @@ +;; https://4clojure.oxal.org/#/problem/009 + +(ns ex.q009) + +(defn ans + "Problem 9, conj on sets" + [] + (conj #{1 4 3} 2)) \ No newline at end of file diff --git a/test/ex/q009_test.clj b/test/ex/q009_test.clj new file mode 100644 index 0000000..2a6018a --- /dev/null +++ b/test/ex/q009_test.clj @@ -0,0 +1,9 @@ +;; https://4clojure.oxal.org/#/problem/009 + +(ns ex.q009-test + (:require [clojure.test :as t] + [ex.q009 :as sut])) + +(t/deftest test-q9 + (t/testing "Problem 9, conj on sets" + (t/is (= #{1 2 3 4} (sut/ans))))) \ No newline at end of file