Skip to content

Commit ad4e2d7

Browse files
author
Jan-Olof Hendig
committed
Added docs for Baggy.values
1 parent 8929182 commit ad4e2d7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

doc/Type/Baggy.pod

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,17 @@ their individual weights into account as opposed to L<kxxv|#method kxxv>.
5656
5757
=head2 method values
5858
59-
=comment TODO
59+
Defined as:
60+
61+
method values(Baggy:D:) returns List:D
62+
63+
Returns a list of all values, i.e. weights, in the C<Baggy> object.
64+
65+
my $breakfast = bag <eggs spam spam spam>;
66+
say $breakfast.values.sort; # (1 3)
67+
68+
my $n = ("a" => 5, "b" => 2, "a" => 1).BagHash;
69+
say $n.values.sort; # (2 6)
6070
6171
=head2 method kv
6272

0 commit comments

Comments
 (0)