Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added docs for Capture.pairs. gfldex++
  • Loading branch information
Jan-Olof Hendig committed Jul 8, 2016
1 parent f577b11 commit 99e2e37
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/Type/Capture.pod6
Expand Up @@ -150,6 +150,24 @@ first followed by the named keys and values.
my $capture = \(2, 3, apples => (red => 2));
say $capture.kv; # (0 2 1 3 apples red => 2)
=head2 method pairs
Defined as:
multi method pairs(Capture:D:) returns Seq:D
Usage:
$capture.pairs
Returns all arguments, the positional followed by the named, as a
L<Seq|/type/Seq> of L<Pairs|/type/Pair>. Positional arguments have
their respective ordinal value, starting at zero, as key while the
named arguments have their names as key.
my Capture $c = \(2, 3, apples => (red => 2));
say $c.pairs; # (0 => 2 1 => 3 apples => red => 2)
=head2 method Bool
Defined as:
Expand Down

0 comments on commit 99e2e37

Please sign in to comment.