Skip to content

Commit b6427a0

Browse files
author
Jan-Olof Hendig
committed
Added docs for Baggy.hash
1 parent 5effb49 commit b6427a0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/Type/Baggy.pod6

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,20 @@ Returns zero.
275275
my $breakfast = bag <eggs bacon>;
276276
say $breakfast.default; # 0
277277
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+
278292
=head2 method Bool
279293
280294
Defined as:

0 commit comments

Comments
 (0)