Skip to content

Commit

Permalink
Add q71
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkun committed Sep 15, 2024
1 parent 563959c commit 2982a36
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ex/q071.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
;; https://4clojure.oxal.org/#/problem/071

(ns ex.q071)

(defn ans
"Problem 71, Rearranging Code: ->"
[]
(-> [2 5 4 1 3 6]
reverse
rest
sort
last))
9 changes: 9 additions & 0 deletions test/ex/q071_test.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
;; https://4clojure.oxal.org/#/problem/071

(ns ex.q071-test
(:require [clojure.test :as t]
[ex.q071 :as sut]))

(t/deftest test-q71
(t/testing "Problem 71, Rearranging Code: ->"
(t/is (= (last (sort (rest (reverse [2 5 4 1 3 6])))) (sut/ans)))))

0 comments on commit 2982a36

Please sign in to comment.