You want unzip
scala> List((1,"a"), (3, "b"), (4, "d")).unzip
res1: (List[Int], List[String]) = (List(1, 3, 4),List(a, b, d))
Similarly there is an unzip3
for List[Tuple3[A, B, C]]
, though anything of higher arity you’d have to implement yourself.
scala> List((1,"a", true), (3, "b", false), (4, "d", true)).unzip3
res2: (List[Int], List[String], List[Boolean]) = (List(1, 3, 4),List(a, b, d),List(true, false, true))