I have a List of Lists in Scala, that looks likes this: List(List(1, 5, 6, 10), List(1, 6), List(1, 3, 10), I want to convert
it into a HashMap[Int, List[Int]] where the first Int is the index of each list and the List[Int] is the list itself. In the end the HashMap should
look like
HashMap[Int, List[Int]](
0 -> List(1, 5, 6, 10),
1 -> List(1, 6),
2 -> List (1, 3, 10),)
Here's my approach, have a list 0 to the length of the list and zip it with this nested list, then somehow
convert it into a HashMap. But I'm looking for something more idiomatic or neater. Any ideas?