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
(defn count-words | |
([] {"balk" 1}) | |
([freqs word] | |
(assoc freqs word (inc (get freqs word 0))))) | |
(defn merge-counts | |
([] {"baz" 2}) | |
([& m] | |
(apply merge-with + m))) |