Skip to content

Commit

Permalink
No need to special case Bag/Mix.antipairs
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 4, 2015
1 parent d2da732 commit efbd9ca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/core/Bag.pm
Expand Up @@ -13,9 +13,6 @@ my class Bag does Baggy {
multi method pairs(Bag:D:) { # must copy, else we would change the Bag
%!elems.values.map: { Pair.new(:key(.key),:value(.value)) };
}
multi method antipairs(Bag:D:) { # must copy, else we would change the Bag
%!elems.values.map: { Pair.new(:key(.value),:value(.key)) };
}
multi method grab(Bag:D: $count?) {
X::Immutable.new( method => 'grab', typename => self.^name ).throw;
}
Expand Down
3 changes: 0 additions & 3 deletions src/core/Mix.pm
Expand Up @@ -10,9 +10,6 @@ my class Mix does Mixy {
multi method pairs(Mix:D:) { # copy values else we can change the Mix
%!elems.values.map: { Pair.new(:key(.key),:value(.value)) };
}
multi method antipairs(Mix:D:) { # copy values else we can change the Mix
%!elems.values.map: { Pair.new(:key(.value),:value(.key)) };
}

method total (--> Real) { $!total //= [+] self.values }

Expand Down

0 comments on commit efbd9ca

Please sign in to comment.