Skip to content

Commit 2d46e62

Browse files
author
Jan-Olof Hendig
committed
Added docs for Capture.kv
1 parent f6d3a24 commit 2d46e62

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/Type/Capture.pod6

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,23 @@ named argument values.
133133
my $capture = \(2, 3, 5, apples => (red => 2));
134134
say $capture.values; # (2 3 5 red => 2)
135135
136+
=head2 method kv
137+
138+
Defined as:
139+
140+
multi method kv(Capture:D:) returns Seq:D
141+
142+
Usage:
143+
144+
$capture.kv
145+
146+
Returns a L<Seq|/type/Seq> of alternating L<keys|#method_keys> and
147+
L<values|#method_values>. The positional keys and values, if any, comes
148+
first followed by the named keys and values.
149+
150+
my $capture = \(2, 3, apples => (red => 2));
151+
say $capture.kv; # (0 2 1 3 apples red => 2)
152+
136153
=head2 method Bool
137154
138155
Defined as:

0 commit comments

Comments
 (0)