我想知道是否可以在多参数组函数上使用柯里化:
scala> def sum(a: Int)(b: Int): Int = { a+b }
sum: (a: Int)(b: Int)Int
scala> sum(3)(4)
res2: Int = 7
scala> val partFunc = sum(3) _
partFunc: Int => Int = <function1>
scala> partFunc(4)
res3: Int = 7
scala> val partFunc2 = sum _ _
<console>:1: error: ';' expected but '_' found.
val partFunc2 = sum _ _
^
scala> val partFunc2 = (sum _) _
<console>:8: error: _ must follow method; cannot follow Int => (Int => Int)
val partFunc2 = (sum _) _