aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Wardhaugh <tyler.wardhaugh@gmail.com>2020-09-28 11:05:17 -0700
committerTyler Wardhaugh <tyler.wardhaugh@gmail.com>2020-09-28 11:05:17 -0700
commit53ff2f5e958dce78188f9fcb10c6944c997b474d (patch)
treefbf376c5f267a222d8f326c4811090c26384faaa
parentaa14cbf8342e04b936f40bcc720a23a258137ecd (diff)
downloadperlweeklychallenge-club-53ff2f5e958dce78188f9fcb10c6944c997b474d.tar.gz
perlweeklychallenge-club-53ff2f5e958dce78188f9fcb10c6944c997b474d.tar.bz2
perlweeklychallenge-club-53ff2f5e958dce78188f9fcb10c6944c997b474d.zip
Ch73: fix bug in Task 1 and add more tests
-rw-r--r--challenge-073/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj2
-rw-r--r--challenge-073/tyler-wardhaugh/clojure/test/tw/weekly/c73_test.clj2
2 files changed, 3 insertions, 1 deletions
diff --git a/challenge-073/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj b/challenge-073/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj
index 8191b98372..d55d6f2e88 100644
--- a/challenge-073/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj
+++ b/challenge-073/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj
@@ -26,4 +26,4 @@
A (or (some->> args rest (map edn/read-string)) [1 5 0 2 9 3 7 6 4 8])]
(cl-format true "~10a: (~{~a~^ ~}), size = ~d~%~10a: (~{~a~^ ~})~%"
"Input" A S
- "Output" (sequence (sliding-min 3) A))))
+ "Output" (sequence (sliding-min S) A))))
diff --git a/challenge-073/tyler-wardhaugh/clojure/test/tw/weekly/c73_test.clj b/challenge-073/tyler-wardhaugh/clojure/test/tw/weekly/c73_test.clj
index 37499e014c..a5bfee6ab0 100644
--- a/challenge-073/tyler-wardhaugh/clojure/test/tw/weekly/c73_test.clj
+++ b/challenge-073/tyler-wardhaugh/clojure/test/tw/weekly/c73_test.clj
@@ -7,6 +7,8 @@
(testing "Task 1"
(are [size input output] (= (sequence (sliding-min size) input) output)
3 [1 5 0 2 9 3 7 6 4 8] (list 0 0 0 2 3 3 4 4)
+ 2 (range 4) (range 3)
+ 3 (range 10 0 -1) (range 8 0 -1)
)))
(deftest ch-2