📜  何时 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:43.346000             🧑  作者: Mango

代码示例1
when {
  x.isOdd() -> print("x is odd")
  x.isEven() -> print("x is even")
  else -> print("x is funny")
}