RosettaCodeData/Task/Enumerations/Perl-6/enumerations.pl6

9 lines
181 B
Raku

enum Fruit <Apple Banana Cherry>; # Numbered 0 through 2.
enum ClassicalElement (
Earth => 5,
'Air', # gets the value 6
'Fire', # gets the value 7
Water => 10,
);