Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement Setty.grabpairs for consistency
  • Loading branch information
lizmat committed Oct 6, 2013
1 parent 08d0f14 commit 2e2f5f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Setty.pm
Expand Up @@ -67,6 +67,9 @@ my role Setty does QuantHash {
method grab($count = 1) {
(%!elems{ %!elems.keys.pick($count) }:delete).list;
}
method grabpairs($count = 1) {
(%!elems{ %!elems.keys.pick($count) }:delete).map( { ($_=>True) } );
}
method pick($count = 1) { %!elems.values.pick($count) }
method roll($count = 1) { %!elems.values.roll($count) }

Expand Down

0 comments on commit 2e2f5f0

Please sign in to comment.