zipWithIndex

trait Collection[A] {
  def zipWithIndex: Collection[(A, Int)]
}

zipWithIndex creates a collection by pairing each element with its own index.