検索
Scalaのパターンマッチは変数を使って分割代入ができる。 val xs = 1 :: 2 :: 3 :: Nil xs match { case head :: tail => s"head is $head" // => "he···