如何在 Scala 中创建匿名和柯里化函数?以下两个失败:
scala> (x:Int)(y:Int) => x*y
<console>:1: error: not a legal formal parameter
(x:Int)(y:Int) => x*y
^
scala> ((x:Int)(y:Int)) => x*y
<console>:1: error: not a legal formal parameter
((x:Int)(y:Int)) => x*y
^