corresponds
trait Collection[A] {
def corresponds[B](bs: Collection[B])(p: (A, B) => Boolean): Boolean
}
corresponds
checks that the predicate p
is satisfied for every pair of elements occupying the same
index in this and the bs
collection, returning true
if so.
If at least a pair of elements do not satisfy p
or there are unpaired elements then this function
returns false
.