method key
Documentation for method key assembled from the following types:
language documentation Type system
From Type system
(Type system) method key
Returns the key of an enum-pair.
say g.key; # OUTPUT: «g»
class Pair
From Pair
(Pair) method key
Defined as:
multi method key(Pair:)
Returns the key part of the Pair.
my = (Perl => 6);say .key; # OUTPUT: «Perl»
class X::Syntax::NegatedPair
(X::Syntax::NegatedPair) method key
Returns the key of the pair that caused the error.