Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
(require '[clojurewerkz.money.amounts :as ma])
(require '[clojurewerkz.money.currencies :as mc])
(require '[clojurewerkz.money.format :as mf])
(let [burgers (ma/multiply (ma/amount-of mc/USD 5.50) 4000000000000000)
milkshakes (ma/multiply (ma/amount-of mc/USD 2.86) 2)
pre-tax (ma/plus burgers milkshakes)
tax (ma/multiply pre-tax 0.0765 :up)]
(println "Total before tax: " (mf/format pre-tax))
(println " Tax: " (mf/format tax))
(println " Total with tax: " (mf/format (ma/plus pre-tax tax))))

View file

@ -0,0 +1,9 @@
(require '[io.randomseed.bankster.money :as m])
(let [burgers (m/mul #money[USD 5.50] 4000000000000000)
milkshakes (m/mul #money[USD 2.86] 2)
pre-tax (m/add burgers milkshakes)
tax (m/with-rounding UP (m/mul pre-tax 0.0765))]
(println "Total before tax: " (m/format pre-tax))
(println " Tax: " (m/format tax))
(println " Total with tax: " (m/format (m/add pre-tax tax))))