sameElements

trait Collection[A] {
  def sameElements(as: Collection[A]): Boolean
}

sameElements checks whether this collection has the same elements in the same order than the collection as and returns true if so.

This function returns false if at least one element doesn’t match its corresponding in as.