File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1238,10 +1238,9 @@ rather than a constructor.)
1238
1238
1239
1239
Like an ordinary list C<pick>, but returns keys of the bag weighted by
1240
1240
values, as if the keys were replicated the number of times indicated
1241
- by the corresponding value and then list pick used. The C<pickpairs> method
1242
- does the same, except it returns both key and value. C<BagHash> is the
1243
- mutable form of C<Bag>. A C<Bag> responds to hash operators as
1244
- if it were a C<Hash of UInt>.
1241
+ by the corresponding value and then list pick used. C<BagHash> is the
1242
+ mutable form of C<Bag>. A C<Bag> responds to hash operators as if it were
1243
+ a C<Hash of UInt>.
1245
1244
1246
1245
The underlying metaphor for picking is that you're pulling colored
1247
1246
marbles out a bag. (For "picking with replacement" see C<roll> instead.)
@@ -1252,6 +1251,9 @@ using the corresponding C<.grab> or C<.grabpairs> method (see below).
1252
1251
Each C<.pick>/C<.pickpairs> invocation maintains its own private state and
1253
1252
has no effect on subsequent C<.pick>/C<.pickpairs> invocations.
1254
1253
1254
+ The C<.pickpairs> version returns the grabbed values as a list of C<Pair>
1255
+ objects, whose keys are the keys and whose values are the replication values.
1256
+
1255
1257
=item roll
1256
1258
1257
1259
multi method roll ( $bag: Int $num = 1 --> Any )
You can’t perform that action at this time.
0 commit comments