Skip to content

Instantly share code, notes, and snippets.

@cemerick
Created November 19, 2010 15:08
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 cemerick/706621 to your computer and use it in GitHub Desktop.
Save cemerick/706621 to your computer and use it in GitHub Desktop.
(reduce
(fn [m w]
(update-in m [w]
#(inc (or % 0))))
{}
(.split "a b a b c d d" "\\W+"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment