2014-02-02 Scalaのmatch構文 Scala 概要 switch文のようなもの。 コード scala> val x = 10 x: Int = 10 scala> x match { | case 1 =>println("x is 1") | case 10 =>println("x is 10") | case _ =>println("x is other number") | } x is 10 scala>