📅  最后修改于: 2022-03-11 14:53:34.030000             🧑  作者: Mango
//when expressions where it separates "matching/condition" part from "result/execution" block
val greet = when(args[0]) {
"Apple", "Orange" -> "fruit"
is Number -> "How many?"
else -> "hi!"
}