Skip to content

Commit

Permalink
Add q64
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkun committed Sep 5, 2024
1 parent 5c18d18 commit f390400
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ex/q064.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
;; https://4clojure.oxal.org/#/problem/064

(ns ex.q064)

(defn ans
"Problem 64, Intro to Reduce"
[]
+)
11 changes: 11 additions & 0 deletions test/ex/q064_test.clj
Original file line number Diff line number Diff line change
@@ -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])))))

0 comments on commit f390400

Please sign in to comment.