How would I yield an immutable.Map in Scala?
Posted
by Jasper
on Stack Overflow
See other posts from Stack Overflow
or by Jasper
Published on 2010-05-04T07:36:24Z
Indexed on
2010/05/04
7:38 UTC
Read the original article
Hit count: 221
I have tried this but it does not work:
val map:Map[String,String] = for { tuple2 <- someList } yield tuple2._1 -> tuple2._2
How else would I convert a List of Tuple2s into a Map?
© Stack Overflow or respective owner