Possible Duplicate:
Use 'map' and stuff on Scala Tuples?为什么我不能迭代(Int,Int,Int)和Map?
为什么我不能遍历这个结构(我不知道如何称呼它,因为Scala的只是调用它(Int, Int, Int)
)?
val list = (1,2,3)
list.map{println _}
上面的代码产生以下错误:
<console>:9: error: value map is not a member of (Int, Int, Int)
(1,2,3).map{println _}
我添加了一个问题的答案的指针[不成形](HTTPS ://github.com/milessabin/shapeless)这可能是有用的。 –