diff --git a/src/ex/q025.clj b/src/ex/q025.clj index 9658214..0220182 100644 --- a/src/ex/q025.clj +++ b/src/ex/q025.clj @@ -2,7 +2,7 @@ (ns ex.q025) -(defn ans +(defn ans "Problem 25, Find the odd numbers" [coll] (filter odd? coll)) \ No newline at end of file diff --git a/src/ex/q027.clj b/src/ex/q027.clj index 0025ca4..c1a6407 100644 --- a/src/ex/q027.clj +++ b/src/ex/q027.clj @@ -2,7 +2,7 @@ (ns ex.q027) -(defn ans +(defn ans "Problem 27, Palindrome Detector" [coll] (= (seq coll) (reverse coll))) ;; O(n) time, but concise \ No newline at end of file diff --git a/test/ex/q012_test.clj b/test/ex/q012_test.clj index d9189f7..418f85b 100644 --- a/test/ex/q012_test.clj +++ b/test/ex/q012_test.clj @@ -6,6 +6,6 @@ (t/deftest test-q12 (t/testing "Problem 12, Sequences" - (t/is (= (first '(3 2 1)) (sut/ans))) - (t/is (= (second [2 3 4]) (sut/ans))) - (t/is (= (last (list 1 2 3)) (sut/ans))))) \ No newline at end of file + (t/is (= (first '(3 2 1)) (sut/ans))) + (t/is (= (second [2 3 4]) (sut/ans))) + (t/is (= (last (list 1 2 3)) (sut/ans))))) \ No newline at end of file diff --git a/test/ex/q042_test.clj b/test/ex/q042_test.clj index 192435c..c3f3dd9 100644 --- a/test/ex/q042_test.clj +++ b/test/ex/q042_test.clj @@ -9,7 +9,7 @@ (t/is (= 1 (sut/ans 1))) (t/is (= 6 (sut/ans 3))) (t/is (= 40320 (sut/ans 8))) - + (t/is (= 1 (sut/ans2 1))) (t/is (= 6 (sut/ans2 3))) (t/is (= 40320 (sut/ans2 8))))) \ No newline at end of file