Skip to content

Instantly share code, notes, and snippets.

Created January 28, 2013 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4655172 to your computer and use it in GitHub Desktop.
Save anonymous/4655172 to your computer and use it in GitHub Desktop.
(defn fold-vec-maps-into-map [coll]
"Provided a reducer, concatenate into a vector.
Note: same as (into [] coll), but parallel."
(let [merge-fn (partial merge-with into)]
(r/fold (r/monoid merge-fn hash-map) merge-fn coll)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment