indexOf

trait Collection[A] {
  def indexOf(a: A): Int
  def indexOf(a: A, j: Int): Int
}

indexOf returns the index of the first element that equals (==) the value a.

The search can start at the given offset j.

If no element equals a then this function returns -1.