Skip to content

Commit 60a1d89

Browse files
committed
Document List.Capture stringifies .keys of Pairs
Rakudo impl: rakudo/rakudo@5b25836f21 Tests: Raku/roast@ae935c92eb
1 parent 059825d commit 60a1d89

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

doc/Type/List.pod6

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -479,12 +479,13 @@ Defined as:
479479
480480
method Capture(--> Capture:D)
481481
482-
Returns a L<Capture|/type/Capture> where each L<Pair|/type/Pair>, if any, in
483-
the C<List> has been converted to a named argument. All other elements in the
484-
C<List> are converted to positional arguments in the order they are found,
485-
i.e. the first non pair item in the list becomes the first positional argument,
486-
which gets index C<0>, the second non pair item becomes the second positional
487-
argument, getting index C<1> etc.
482+
Returns a L<Capture> where each L<Pair>, if any, in the C<List> has been
483+
converted to a named argument (with the L<key|/type/Pair#method_key> of the
484+
L<Pair> stringified). All other elements in the C<List> are converted to
485+
positional arguments in the order they are found, i.e. the first non pair item
486+
in the list becomes the first positional argument, which gets index C<0>, the
487+
second non pair item becomes the second positional argument, getting
488+
index C<1> etc.
488489
489490
my $list = (7, 5, a => 2, b => 17);
490491
my $capture = $list.Capture;

0 commit comments

Comments
 (0)