scala> trait A { def greeting(name: String): String } defined trait A // これは普通 scala> val a1: A = new A { def greeting(name: String): String = "Hello, " + name } a1: A = $anon$1@5c0f79f0 scala> a1.greeting("Serval") res0: String = Hello, Serval // !!!?!?!?!??!?!??!!?!? scala> val a2: A = { name: String => "Hello, " + name } a2: A = $$Lambda$1050/812031404@629adce scala> a2.greeting("Arai-san") res