[ad_1]
You can use List#grouped to create a non-overlapping window:
list.grouped(2).map(l => (l(0), l(1))).toMap
7
[ad_2]
solved How to convert a list of string to map in Scala?
[ad_1]
You can use List#grouped to create a non-overlapping window:
list.grouped(2).map(l => (l(0), l(1))).toMap
7
[ad_2]
solved How to convert a list of string to map in Scala?