title: Wait for all nested Futures to complete
body: <pre><code>val works: Seq[Future[Seq[Future[String]]]] = ...
  </code></pre>
  
  <p>How would I wait for all these top and nested <code>Futures</code> to complete?</p>
  
  <p>My first idea is:</p>
  
  <pre><code>val result1: Seq[Seq[Future[String]]] = Await.result(
    Future.sequence(works), Duration.Inf
  )
  
  val result2: Seq[String] =  Await.result(
    Future.sequence(result1.flatten), Duration.Inf
  )
  </code></pre>
  
  <p>But I guess it is not as effiecient as it could be.</p>