Skip to content

Instantly share code, notes, and snippets.

@mwmitchell
Created August 12, 2013 16:40
Show Gist options
  • Save mwmitchell/6212649 to your computer and use it in GitHub Desktop.
Save mwmitchell/6212649 to your computer and use it in GitHub Desktop.
rename and select keys from map
(require 'clojure.set)
(defn rename-and-select-keys [m new-names]
(-> m (clojure.set/rename-keys new-names)
(select-keys (vals new-names))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment