Skip to content

Instantly share code, notes, and snippets.

@j1n3l0
Last active December 15, 2015 04:59
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 j1n3l0/5205587 to your computer and use it in GitHub Desktop.
Save j1n3l0/5205587 to your computer and use it in GitHub Desktop.
(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