Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
somecho committed May 7, 2023
1 parent 513b853 commit efe133d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions keepbooks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,6 @@
(when-not (valid-amount? amt)
(throw (Exception. (str amt " is an invalid amount")))))

(defn validate-single-txn [txn]
(let [args (:args txn)
num-args (count args)
rules [validate-date
validate-string
validate-string
validate-string
validate-amount
validate-string]]
(when (> num-args 6)
(throw (Exception. "Too many arguments!")))
(when (< num-args 4)
(throw (Exception. "There are some missing arguments.")))
(mapv #(%1 %2) (take-last num-args rules) args)))

(defn validate-txn [txn]
(validate-date (:date txn))
(mapv validate-string (:payee txn))
Expand Down

0 comments on commit efe133d

Please sign in to comment.