I've got some utilities that I use occasionally that are built off of distinct and frequencies.
Does anyone think it makes sense to add extra arities to these fns in clojure.core to support this?
(defn frequencies
"Returns a map from distinct items in coll to the number of times
they appear."
{:added "1.2"
:static true}
([coll]
(frequencies identity coll))
([keyfn coll]
(persistent!
(reduce (fn [counts x]
(let [x' (keyfn x)]
(assoc! counts x' (inc (get counts x' 0)))))
(transient {})
coll))))
And then a similar change for clojure.core/distinct.