Supports editing expense accounts
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user