Skip to content

Commit 256d21e

Browse files
committed
Weights and quantity of sets converted into Mix/Bags #2632
1 parent 218b9f4 commit 256d21e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/Type/Setty.pod6

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ Returns a L<Bag|/type/Bag> containing the elements of the invocant.
211211
my Bag $b = Set.new(1, 2, 3).Bag;
212212
say $b; # OUTPUT: «bag(3, 1, 2)␤»
213213
214+
The quantity of the elements in this created bag will be set to one:
215+
216+
say (1,2,3).Bag{1}; # OUTPUT: «1␤»
217+
218+
214219
=head2 method BagHash
215220
216221
Defined as:
@@ -247,6 +252,10 @@ Returns a L<Mix|/type/Mix> containing the elements of the invocant.
247252
my Mix $b = Set.new(1, 2, 3).Mix;
248253
say $b; # OUTPUT: «mix(3, 1, 2)␤»
249254
255+
The elements of the returned C<Mix> will have weights equal to 1:
256+
257+
say (1,2,3).Mix{3}; # OUTPUT: «1␤»
258+
250259
=head2 method MixHash
251260
252261
Defined as:

0 commit comments

Comments
 (0)