Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
// A match statement more like the traditional switch statement
|
||||
// often seen in other languages.
|
||||
enum PizzaTopping { Cheese, Pepperoni, Peppers, Pineapple }
|
||||
|
||||
let topping = Peppers
|
||||
|
||||
match (topping) {
|
||||
Cheese => print("Would it really be pizza without it?"),
|
||||
Pepperoni => print("An instant classic."),
|
||||
Peppers => {
|
||||
// We can use a block for more expressions.
|
||||
print("For those who like to spice things up.")
|
||||
},
|
||||
Pineapple => print("You do you.")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue