Scala実践プログラミングより写経
Scala実践プログラミングより写経
scala> def date(year:Int, month:Int, day:Int) = "%s/%02d/%02d" format(year, month, day) date: (year: Int,month: Int,day: Int)String scala> date(2011, 07, 18) res22: String = 2011/07/18 scala> date(day=19, year=2011, month=07) res23: String = 2011/07/19