Skip to content

Instantly share code, notes, and snippets.

@billdozr
Created August 26, 2009 21:21
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 billdozr/175860 to your computer and use it in GitHub Desktop.
Save billdozr/175860 to your computer and use it in GitHub Desktop.
(use 'clojure.set)
(def new-roles #{{:id 3 :name "pmo"} {:id 2 :name "engineer"} {:id 5 :name "pa"} {:id 1 :name "contributor"}})
(def existing-roles #{{:id 5 :name "pa"} {:id 0 :name "guest"}})
(defn updated-new-roles [nr er]
(into (difference nr er) (intersection er nr)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment