object Problem188 { def proc: Int = { val d = Seq(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) val md = (1 to 12).zip(d) val happyDays = md map { case (month, days) => (1 to days).count(day => month == (day / 10 + day % 10)) } happyDays.sum } def main(args: Array[String]) { val result: Int = proc println(result) } }