Created
July 8, 2016 15:23
-
-
Save dogbert17/226e7adbd1be17f38f00986b2e8e1bc0 to your computer and use it in GitHub Desktop.
Attempt to document Capture.pairs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment