Skip to content

Instantly share code, notes, and snippets.

@jpbougie
Created June 3, 2011 04:09
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 jpbougie/1005858 to your computer and use it in GitHub Desktop.
Save jpbougie/1005858 to your computer and use it in GitHub Desktop.
flatten sets without duplicates
(def f (fn x[i] (if (set? (first i)) (if (not-empty (apply intersection (map x i))) "duplicates!" (apply union (map x i))) i)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment