Created
May 28, 2016 14:48
-
-
Save dogbert17/ac2e37814987267451d3a04cfdad324a to your computer and use it in GitHub Desktop.
Attempt to document method 'of' in class Hash
This file contains hidden or 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 of | |
Defined as: | |
method of | |
Usage: | |
Hash.of | |
Returns the type constraint for the values of the invocant. By default, | |
i.e. if no type constraint is given during declaration, the method | |
returns C<(Mu)>. | |
my %h1 = 'apples' => 3, 'oranges' => 7; # (no type constraint specified) | |
say %h1.of; # (Mu) | |
my Int %h2 = 'oranges' => 7; # (values must be of type Int) | |
say %h2.of; # (Int) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment