Last active
December 15, 2015 04:59
-
-
Save j1n3l0/5205587 to your computer and use it in GitHub Desktop.
This file contains 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
(fn f | |
([n] (f n [100 50 20 10 5 1] {})) | |
([n [x & xs :as coll] acc] | |
(if-not (seq coll) | |
acc | |
(f (mod n x) xs (assoc acc x (unchecked-divide-int n x)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment