Equality function for pair components

Viewed 241

Is there a function in Scala that compares the two components of a pair for equality? Something like:

def pairEquals[A, B](pair: Pair[A, B]): Boolean = (pair._1 == pair._2)

In Haskell, that would be:

uncurry (==)
1 Answers
Related