We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5effb49 commit b6427a0Copy full SHA for b6427a0
doc/Type/Baggy.pod6
@@ -275,6 +275,20 @@ Returns zero.
275
my $breakfast = bag <eggs bacon>;
276
say $breakfast.default; # 0
277
278
+=head2 method hash
279
+
280
+Defined as:
281
282
+ method hash(Baggy:D:) returns Hash:D
283
284
+Returns a L<Hash|/type/Hash> where the elements of the invocant
285
+are the keys and their respective weights the values;
286
287
+ my $breakfast = bag <eggs bacon bacon>;
288
+ my $h = $breakfast.hash;
289
+ say $h.WHAT; # (Hash)
290
+ say $h; # {bacon => 2, eggs => 1}
291
292
=head2 method Bool
293
294
Defined as:
0 commit comments