Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Symmetric-difference/Erlang/symmetric-difference.erl
Normal file
11
Task/Symmetric-difference/Erlang/symmetric-difference.erl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
%% Implemented by Arjun Sunel
|
||||
-module(symdiff).
|
||||
-export([main/0]).
|
||||
|
||||
main() ->
|
||||
SetA = sets:from_list(["John","Bob","Mary","Serena"]),
|
||||
SetB = sets:from_list(["Jim","Mary","John","Bob"]),
|
||||
AUnionB = sets:union(SetA,SetB),
|
||||
AIntersectionB = sets:intersection(SetA,SetB),
|
||||
SymmDiffAB = sets:subtract(AUnionB,AIntersectionB),
|
||||
sets:to_list(SymmDiffAB).
|
||||
Loading…
Add table
Add a link
Reference in a new issue