Skip to content

Instantly share code, notes, and snippets.

@borkdude
Created May 30, 2010 15:34
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 borkdude/419108 to your computer and use it in GitHub Desktop.
Save borkdude/419108 to your computer and use it in GitHub Desktop.
(defn force-set [n]
(if (set? n) n
(conj #{} n)))
(merge-with (fn [r l] (conj (force-set r) l)) {:a 1 :b 2} {:a 1 :b 3})
=> {:a #{1}, :b #{2 3}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment