Skip to content

Commit

Permalink
Add Pair.keys and Pair.values.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed May 15, 2010
1 parent ddaab3d commit 82f7ef3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/Pair.pm
Expand Up @@ -2,6 +2,14 @@ augment class Pair {
multi method perl() {
$.key.perl ~ ' => ' ~ $.value.perl;
}

method keys() {
[self.key];
}

method values() {
[self.value];
}
}

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

0 comments on commit 82f7ef3

Please sign in to comment.