scala> List("Mary", "had", "a", "little", "lamb").indexOf("little")
res0: Int = 3
You might try reading the scaladoc for List next time. 😉
scala> List("Mary", "had", "a", "little", "lamb").indexOf("little")
res0: Int = 3
You might try reading the scaladoc for List next time. 😉