Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add kv sub, Pair.invert.
  • Loading branch information
colomon committed Dec 19, 2011
1 parent 383966e commit 1da092a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/CORE.setting
Expand Up @@ -1273,6 +1273,9 @@ my class Pair is Enum {
method Str() {
$.key ~ "\t" ~ $.value
}
method invert() {
$.value => $.key
}
}
# XXX This ought to be more read-only
Expand Down Expand Up @@ -1396,6 +1399,7 @@ sub invert(%h) { %h.invert }
sub keys(%h) { %h.keys }
sub values(%h) { %h.values }
sub kv($p) { $p.kv }
sub sort(*@bits) { @bits.sort }
Expand Down

0 comments on commit 1da092a

Please sign in to comment.