Scala List of tuples to flat list
scala
Solution
Some of the options might be: concatenate:
list.map(t => t._1 + t._2)
one after the other interleaved (after your comment it seems you were asking for this):
list.flatMap(t => List(t._1, t._2))
split and append them:
list.map(_._1) ++ list.map(_._2)
Problem
I have list of tuple pairs, `List[(String,String)]` and want to flatten it to a list of strings, `List[String]`.