【发布时间】:2014-10-21 13:44:49
【问题描述】:
我正在尝试使用嵌套函数过滤压缩数组,但出现与变量“mergedRow”类型相关的编译错误
这是我的例子:
ScalaVersion = 2.10.4
val arrayOne : Seq[IndexedSeq[Double]] = Seq.empty
val arrayTow : Seq[IndexedSeq[String]] = Seq.empty
(this.arrayOne , this.arrayTow).zipped.filter{
mergedRow : (IndexedSeq[String], IndexedSeq[Double])=>
// some processing
true
}
编译错误:
Error:(130, 51) type mismatch;
found : ((IndexedSeq[String], IndexedSeq[Double])) => Boolean
required: (IndexedSeq[String], IndexedSeq[Double]) => Boolean
mergedRow : (IndexedSeq[String], IndexedSeq[Double])=>
^
我不知道此错误的根源,因此我们将不胜感激。
干杯。
【问题讨论】:
标签: scala scala-collections scala-2.10