3 ms·
Replying to myself. Just googled it and I had the code wrong shame (defn count-words [coll] (reduce #(merge-with + %1 {%2 1}) {} coll))
by runevault 16y ago
Replying to myself. Just googled it and I had the code wrong shame
(defn count-words [coll]
(reduce #(merge-with + %1 {%2 1}) {} coll))