Examples · learn/06-enums · 115 of 339
forgot.fails
tin run examples/learn/06-enums/forgot.fails.tintype Light = | Red | Amber | Green
fn action(l: Light): string => match l {
Red => "stop"
Green => "go"
}
fn main() {
print(action(Amber))
} Examples · learn/06-enums · 115 of 339
tin run examples/learn/06-enums/forgot.fails.tintype Light = | Red | Amber | Green
fn action(l: Light): string => match l {
Red => "stop"
Green => "go"
}
fn main() {
print(action(Amber))
}