Skip to content

Instantly share code, notes, and snippets.

@ponzao
Created July 26, 2010 21:55
Show Gist options
  • Save ponzao/491319 to your computer and use it in GitHub Desktop.
Save ponzao/491319 to your computer and use it in GitHub Desktop.
(defn char-counter [str]
(reduce
(fn [m c]
(assoc m c (inc (get m c 0))))
{}
str))
@ponzao
Copy link
Author

ponzao commented Jul 26, 2010

It seems I rewrote a core-function (frequencies).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment