なぜこれがうまくいかないのだろうか:
object test {
def method1(a: Int) = println(a) // println a -- doesn't work either
method1 123
}
method1
パラメータしかとらない、つまり括弧を省略できるんですね。
なぜこれがうまくいかないのだろうか:
object test {
def method1(a: Int) = println(a) // println a -- doesn't work either
method1 123
}
method1
パラメータしかとらない、つまり括弧を省略できるんですね。