尝试映射元组列表时出现编译错误。我有回Future[List[(String, String)]]
的方法,我需要使用这两个集的字符串值,使调用其他方法Map Scala元组列表
def myHelper(): Future[List[(String, String)]] = { ... }
def myWork() = {
myHelper() map {
case(firstVal, secondVal) => otherWork(firstVal, secondVal)
}
}
错误,我得到的是
found: (T1, T2)
required: List[(String, String)]
什么建议吗?
编辑 嗯....我不清楚我的问题。 otherWork
预计所有结果列表
def otherWork(firstVals: List[String], secondVals: List[Strong]) = { ... }
我已经更新我的答案。而且,'otherWork'返回类型是什么? –