lots of QOL improvements.

This commit is contained in:
Bryce Covert
2020-07-31 18:26:57 -07:00
parent 98f0d40313
commit be9c789003
15 changed files with 302 additions and 282 deletions

View File

@@ -36,3 +36,12 @@
(defn dollars= [amt1 amt2]
(dollars-0? (- amt1 amt2) ))
(defn deep-merge [v & vs]
(letfn [(rec-merge [v1 v2]
(if (and (map? v1) (map? v2))
(merge-with deep-merge v1 v2)
v2))]
(if (some identity vs)
(reduce #(rec-merge %1 %2) v vs)
(last vs))))