Anonymous user
Symmetric difference: Difference between revisions
→{{header|Mathematica}}
(→{{header|Lua}}: Shortened Lua OO-version) |
|||
Line 1,313:
Difference A\B : {Serena}
Difference B\A : {Jim}
=={{header|Maple}}==
Maple has built-in support for set operations. Assign the sets A and B:
<lang Maple>
A := {John, Bob, Mary, Serena};
B := {Jim, Mary, John, Bob};
</lang>
Now compute the symmetric difference with the '''symmdiff''' command:
<lang Maple>
symmdiff(A, B);
</lang>
{{out}}
{Jim, Serena}
=={{header|Mathematica}}==
|