Created
September 12, 2021 18:32
-
-
Save ChrisBlom/776e73ac245ce3c94ccd742f797cdca4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [l [0 0 1 1 1 14 5 13 6 3 ] | |
m [0.01 0.02 0.05 0.1 0.2 0.5 1 2 5 10 20 50 100] | |
subtotals (map * m l) | |
total (reduce + subtotals)] | |
(doseq [[munt totaal] (sort-by key > (zipmap m subtotals))] | |
(printf "%s\t%.2f%n" munt (float totaal))) | |
total) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment