Permalink
Browse files

Added method "invert" to Baggy, as per TimToady's mumbling

  • Loading branch information...
lizmat committed Oct 1, 2013
1 parent 85b9a40 commit 95f6c006dd78f4aa2dc83d509fc47ab77ce566bb
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/core/Baggy.pm
View
@@ -18,6 +18,7 @@ my role Baggy does Associative {
method Real { self.elems }
method hash(--> Hash) { %!elems.values.hash }
+ method invert(--> List) { %!elems.values.map: { ( .value => .key ) } }
method new(*@args --> Baggy) {
my %e;

0 comments on commit 95f6c00

Please sign in to comment.