Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added docs for Baggy.antipairs
  • Loading branch information
Jan-Olof Hendig committed Jun 20, 2016
1 parent 74757ad commit c6e9981
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/Type/Baggy.pod
Expand Up @@ -153,6 +153,19 @@ where the key is the element itself and the value is the weight of that element.
my $seq = $breakfast.pairs;
say $seq.sort; # (bacon => 2 eggs => 1)
=head2 method antipairs
Defined as:
method antipairs(Baggy:D:) returns Seq:D
Returns all elements and their respective weights as a L<Seq|/type/Seq> of C<Pair>s
where the element itself is the value and the weight of that element is the key, i.e.
the opposite of method L<pairs|#method pairs>.
my $breakfast = bag <eggs bacon>;
my $seq = $breakfast.antipairs;
say $seq.sort; # (1 => eggs 2 => bacon)
=head2 method classify-list
Expand Down

0 comments on commit c6e9981

Please sign in to comment.