有人可以告诉我为什么以下不起作用?
object TestObject {
def map(f: (Double, Double) => Double, x2: Array[Double]) = {
val y = x2.zip( x2 )
val z = y.map(f)
z
}
}
产生此错误:
type mismatch; found : (Double, Double) => Double required: ((Double, Double)) => ?