title: Get index of element for Iterable
body: <p>What is the elegant way to find index of element in collection? For now I implemented method like this:</p>
  
  <pre><code>  def getIndexForValue[T] (value: T, collection: Iterable[T]): Option[Int] = {
      val pair = collection.zipWithIndex.find(_._1 == value)
      if (pair.isDefined) Some(pair.get._2) else None
    }
  </code></pre>
  
  <p>Can it be rewritten in more elegant way? Thanks</p>