How to convert scala List in to Map

Not super-short:

List(1,2,3,4).grouped(2).collect{ case List(k,v) => k -> v }.toMap

Leave a Comment