-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
20 additions
and
22 deletions.
There are no files selected for viewing
13 changes: 6 additions & 7 deletions
13
exercises/practice/zebra-puzzle/.meta/solutions/lib/ZebraPuzzle.rakumod
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
unit module ZebraPuzzle; | ||
|
||
enum Nationality is export <Englishman Japanese Norwegian Spaniard Ukranian>; | ||
|
||
my role Owned { | ||
method owner (::?CLASS:D:) { | ||
return Japanese; | ||
return ::('Japanese'); | ||
} | ||
} | ||
|
||
my role Drinkable { | ||
method drinker (::?CLASS:D:) { | ||
return Norwegian; | ||
return ::('Norwegian'); | ||
} | ||
} | ||
|
||
enum Beverage does Drinkable is export <Coffee Milk OrangeJuice Tea Water>; | ||
enum Pet does Owned is export <Dog Fox Horse Snails Zebra>; | ||
enum SmokeBrand <Chesterfield Kools LuckyStrike OldGold Parliament>; | ||
enum Nationality is export <Englishman Japanese Norwegian Spaniard Ukranian>; | ||
enum Beverage does Drinkable is export <Coffee Milk OrangeJuice Tea Water>; | ||
enum Pet does Owned is export <Dog Fox Horse Snails Zebra>; | ||
enum SmokeBrand <Chesterfield Kools LuckyStrike OldGold Parliament>; | ||
|
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
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