Skip to content

Instantly share code, notes, and snippets.

@marcomorain
Created January 15, 2019 22: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 marcomorain/4d56cbc0605e01fe8b97788d4cba62e6 to your computer and use it in GitHub Desktop.
Save marcomorain/4d56cbc0605e01fe8b97788d4cba62e6 to your computer and use it in GitHub Desktop.
(defn anglo [num]
(apply str
(reverse
(flatten
(interpose ","
(partition 3 3 (repeat "")
(reverse (str num))))))))
(anglo "12345678900") => "12,345,678,900"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment