16 lines
349 B
Plaintext
16 lines
349 B
Plaintext
enum Topping { Cheese, Pepperoni, Peppers, Pineapple }
|
|
enum Menu { Pizza(Topping), Calzone(Topping) }
|
|
|
|
let item = Calzone(Peppers)
|
|
|
|
match (item) {
|
|
Calzone(topping) => {
|
|
if (checkSpecials(topping)) {
|
|
print("These are half off this week.")
|
|
} else {
|
|
print("No current specials.")
|
|
}
|
|
},
|
|
_ => print("No current specials.")
|
|
}
|