Skip to content

Commit

Permalink
Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkun committed Aug 11, 2024
1 parent ed06eaa commit bb37607
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ex/q025.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(ns ex.q025)

(defn ans
(defn ans
"Problem 25, Find the odd numbers"
[coll]
(filter odd? coll))
2 changes: 1 addition & 1 deletion src/ex/q027.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions test/ex/q012_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)))))
(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)))))
2 changes: 1 addition & 1 deletion test/ex/q042_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)))))

0 comments on commit bb37607

Please sign in to comment.