How do I find the index of an element in a Scala list.
val ls = List(\"Mary\", \"had\", \"a\", \"little\", \"lamb\")
I need to get 3 if I ask f
scala> List("Mary", "had", "a", "little", "lamb").indexOf("little") res0: Int = 3
You might try reading the scaladoc for List next time. ;)