Scala Match по умолчанию
something match {
case "val" => "found match!!"
case _ => "default case"
}
z0san
something match {
case "val" => "found match!!"
case _ => "default case"
}
val x: Int = Random.nextInt(10)
x match {
case 0 => "zero"
case 1 => "one"
case 2 => "two"
case _ => "other"
}