 (defn cwd []
   (System/getProperty "user.dir"))
 
+(defn sum [v]
+  (reduce + 0 v))
+
 (def date-formatter
   (f/formatter "yyyy-MM-dd"))
 


(defn parse-date [date-string]
  (f/parse date-formatter date-string))

(defn read-json [file]
  (json/read-str (slurp file)))

   "Client" (get invoice "client")
   "Issue date" (get invoice "issue-date")
   "Due date" (get invoice "due-date")
   "Amount" (format-amount (get invoice "amount") (get invoice "currency"))
   "Paid" (format-amount (sum (map #(get % "amount") (get invoice "payments")))
                         (get invoice "currency"))})

(defn options-to-filter [options]
  (fn [invoice]
