Skip to content

Instantly share code, notes, and snippets.

@smallgeek
Created November 6, 2016 07:42
Show Gist options
  • Save smallgeek/fd022234cf8a62045ead4d36cc1431f4 to your computer and use it in GitHub Desktop.
Save smallgeek/fd022234cf8a62045ead4d36cc1431f4 to your computer and use it in GitHub Desktop.
exclusive or
let xs1 = Set[Set[1;2;3]; Set[4;5;6]; Set[7;8;9]]
let xs2 = Set[Set[4;5;6]; Set[7;8;9]; Set[10;11;12]]
let union =
[xs1; xs2]
|> Set.unionMany
let intersect =
[xs1; xs2]
|> Set.intersectMany
Set.difference union intersect
|> printfn "%A"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment