Supports editing expense accounts

This commit is contained in:
Bryce Covert
2019-04-12 12:00:42 -07:00
parent bdb06d802b
commit e64820d71a
6 changed files with 119 additions and 53 deletions

View File

@@ -19,12 +19,18 @@
existing))
(defn replace-by [xs f x]
(mapv
(fn [t]
(if (= (f t) (f x))
x
t))
xs))
(let [found? (atom false)
replaced (mapv
(fn [t]
(if (= (f t) (f x))
(do (reset! found? true)
(println "found" (f t) t (f x) x)
x)
t))
xs)]
(if @found?
replaced
(conj replaced x))))
(defn dollars-0? [amt]
(< -0.001 amt 0.001))