Skip to content

Commit

Permalink
Pair.invert
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jun 18, 2010
1 parent 712cba4 commit 717459e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Pair.pm
Expand Up @@ -10,6 +10,10 @@ augment class Pair {
method values() {
[self.value];
}

multi method invert() {
$.value => $.key;
}
}

multi sub infix:<cmp>(Pair $a, Pair $b) {
Expand Down

0 comments on commit 717459e

Please sign in to comment.