Skip to content

Commit e734e1a

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

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
@@ -70,7 +70,17 @@ Returns a list of all values, i.e. weights, in the C<Baggy> object.
7070
7171
=head2 method kv
7272
73-
=comment TODO
73+
Defined as:
74+
75+
method kv(Baggy:D:) returns List:D
76+
77+
Returns a list of keys and values interleaved.
78+
79+
my $breakfast = bag <eggs spam spam spam>;
80+
say $breakfast.kv; # (spam 3 eggs 1)
81+
82+
my $n = ("a" => 5, "b" => 2, "a" => 1).BagHash;
83+
say $n.kv; # (a 6 b 2)
7484
7585
=head2 method kxxv
7686

0 commit comments

Comments
 (0)