What would be the best way to transform:
val arr: List[String]
To:
val mapArr: List[Tuple[Int, String]]
Where:
each Tuple is:
- String value is the an odd index element of the list
- Int the size of the previous value.
Example:
val stringArr = List("a", "aaa", "bb", "abc")
val resultShouldBe = List((1, "aaa"), (2, "abc"))