RosettaCodeData/Task/Symmetric-difference/Perl-6/symmetric-difference.pl6
2020-02-17 23:21:07 -08:00

7 lines
297 B
Raku
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

my \A = set <John Serena Bob Mary Serena>;
my \B = set <Jim Mary John Jim Bob>;
say A B; # Set subtraction
say B A; # Set subtraction
say (A B) (A B); # Symmetric difference, via basic set operations
say A B; # Symmetric difference, via dedicated operator