class Enum
src
class Enum does Associative { ... }
An Enum consists of a key and a value. It is the immutable version of
Pair (which inherits from Enum).
Methods
key
multi method key(Enum:D:)
Returns the key part of the Enum.
value
multi method value(Enum:D:)
Returns the value part of the Enum.
invert
multi method invert(Enum:D:) returns Enum:D
Returns a new Enum with the original enum's value as the key, and the
original enum's key as value.