Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
8
Task/Symmetric-difference/Elixir/symmetric-difference.ex
Normal file
8
Task/Symmetric-difference/Elixir/symmetric-difference.ex
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
iex(1)> a = ~w[John Bob Mary Serena] |> MapSet.new
|
||||
#MapSet<["Bob", "John", "Mary", "Serena"]>
|
||||
iex(2)> b = ~w[Jim Mary John Bob] |> MapSet.new
|
||||
#MapSet<["Bob", "Jim", "John", "Mary"]>
|
||||
iex(3)> sym_dif = fn(a,b) -> MapSet.difference(MapSet.union(a,b), MapSet.intersection(a,b)) end
|
||||
#Function<12.54118792/2 in :erl_eval.expr/5>
|
||||
iex(4)> sym_dif.(a,b)
|
||||
#MapSet<["Jim", "Serena"]>
|
||||
Loading…
Add table
Add a link
Reference in a new issue