Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Tuple2类和Pairscala之间有区别吗?
Tuple2
Pair
在我看来,他们做的事情完全相同。
是的。两者都是一样的
type Pair[+A, +B] = Tuple2[A, B]
https://github.com/scala/scala/blob/v2.9.2/src/library/scala/Predef.scala#L1第227行