Skip to content

Instantly share code, notes, and snippets.

@gtrak
Created June 7, 2012 19:54
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 gtrak/2891175 to your computer and use it in GitHub Desktop.
Save gtrak/2891175 to your computer and use it in GitHub Desktop.
Does this exist?
(defn diff-vals
[old new]
(let [new-minus-old (difference (into #{} (vals new))
(into #{} (vals old)))]
(map-invert (select-keys (map-invert new) new-minus-old))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment