Skip to content

Commit

Permalink
Shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
m-dango committed Apr 15, 2024
1 parent a4ca5e1 commit e48b85c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
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>;

21 changes: 10 additions & 11 deletions exercises/practice/zebra-puzzle/.meta/template-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,22 @@ properties:
END
example: |
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>;
stub: |
my role Owned {
Expand All @@ -53,7 +52,7 @@ stub: |
}
}
enum Beverage does Drinkable is export <Coffee Milk OrangeJuice Tea Water>;
enum Nationality is export <Englishman Japanese Norwegian Spaniard Ukranian>;
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>;
8 changes: 4 additions & 4 deletions exercises/practice/zebra-puzzle/lib/ZebraPuzzle.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ my role Drinkable {
}
}

enum Beverage does Drinkable is export <Coffee Milk OrangeJuice Tea Water>;
enum Nationality is export <Englishman Japanese Norwegian Spaniard Ukranian>;
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>;

0 comments on commit e48b85c

Please sign in to comment.