Created
June 24, 2016 12:00
-
-
Save dogbert17/56d39157e503843a0708f646f9261355 to your computer and use it in GitHub Desktop.
Attempt to document Map.antipairs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method antipairs | |
Defined as: | |
method antipairs(Map:D:) returns Seq:D | |
Returns all keys and their respective values as a L<Seq|/type/Seq> of C<Pair>s | |
where the keys and values have been exchanged, i.e. the opposite of method | |
L<pairs|#method_pairs>. Unlike the L<invert|#method_invert> method, there is | |
no attempt to expand list values into multiple pairs. | |
my $m = Map.new('a' => (2, 3), 'b' => 17); | |
say $m.antipairs; # ((2 3) => a 17 => b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment