Is there any List/Sequence built-in that behaves like map and provides the element\'s index as well?
map
If you require searching the map values as well (like I had to):
val ls = List("a","b","c") val ls_index_map = ls.zipWithIndex.toMap