added ability to remove a transaction rule.

This commit is contained in:
Bryce Covert
2020-08-03 16:54:12 -07:00
parent a22eb01008
commit d989279058
10 changed files with 185 additions and 51 deletions

View File

@@ -31,6 +31,19 @@
replaced
(into [x] replaced))))
(defn merge-by [xs f x]
(let [found? (atom false)
replaced (mapv
(fn [t]
(if (= (f t) (f x))
(do (reset! found? true)
(merge t x))
t))
xs)]
(if @found?
replaced
(into [x] replaced))))
(defn dollars-0? [amt]
(< -0.001 amt 0.001))