2010-03-29から1日間の記事一覧
val lines = input.getLines.collect は2.8では使えない。 import scala.io._ def toInt(in:String):Option[Int] = try { Some(Integer.parseInt(in.trim)) } catch { case e: NumberFormatException => None } def sum(in:Seq[String]) = { val ints = in.f…