Skip to content

Instantly share code, notes, and snippets.

@jeremyheiler
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyheiler/899dd9419d5a4ba4671f to your computer and use it in GitHub Desktop.
Save jeremyheiler/899dd9419d5a4ba4671f to your computer and use it in GitHub Desktop.
user> (def m {:a {:b 2 :c 3} :b {:d 4 :e 5} :c {:f 6}})
#'user/m
user> (reduce (fn [m k] (update-in m [k] (comp vec keys))) m (keys m))
{:c [:f], :b [:e :d], :a [:c :b]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment