Scala transforming a Seq with Future
I have a Seq of a tuple that looks like this: Seq[(Future[Iterable[Type1]], Future[Iterator[Type2]])] I want to transform this into the following: Future[Seq([Iterable[Type1], [Iterable[Type2])] Is this even possible? This should do the trick val a: Seq[(Future[Iterable[Type1]], Future[Iterable[Type2]])] = ... val b: Future[Seq[(Iterable[Type1], Iterable[Type2])]] = Future.sequence(a.map{ case (l, r) => l.flatMap(vl => r.map(vr => (vl, vr))) }) A bit simpler than Till Rohrmann's answer. Not tested, but should work. val seq: Seq[(Future[Iterable[Type1]], Future[Iterable[Type2]])] = ... val seq2