Permalink
Browse files

Add KeyBag|KeySet.delete, so that :delete works on KeyBag|KeySet

  • Loading branch information...
1 parent 7a71ec7 commit e7d2175028911953b0be5134a9143b30d38a3588 @lizmat lizmat committed Sep 1, 2013
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/core/KeyBag.pm
  2. +1 −0 src/core/KeySet.pm
View
@@ -6,6 +6,7 @@ my class KeyBag does Associative does Baggy {
method values { %!elems.values }
method elems returns Int { [+] self.values }
method exists($a) returns Bool { %!elems.exists($a) }
+ method delete($k) { %!elems.delete($k) }
method Bool { %!elems.Bool }
method Numeric { self.elems }
method Real { self.elems }
View
@@ -6,6 +6,7 @@ my class KeySet is Iterable does Associative {
method values { %!elems.values }
method elems returns Int { %!elems.elems }
method exists($a) returns Bool { %!elems.exists($a) && %!elems{$a} }
+ method delete($k) { %!elems.delete($k) }
method Bool { %!elems.Bool }
method Numeric { %!elems.Numeric }
method Real { %!elems.Numeric.Real }

0 comments on commit e7d2175

Please sign in to comment.