Skip to content

Instantly share code, notes, and snippets.

@ChrisBlom
Created September 12, 2021 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChrisBlom/776e73ac245ce3c94ccd742f797cdca4 to your computer and use it in GitHub Desktop.
Save ChrisBlom/776e73ac245ce3c94ccd742f797cdca4 to your computer and use it in GitHub Desktop.
(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