title: Scala - Future List first completed with condition
body: <p>I have a list of Futures and I want to get the first one completed with a certain condition. 
  Here is an example of a possible code:</p>
  
  <pre><code>val futureList: Future[List[T]] = l map (c =&gt; c.functionWithFuture())
  val data = for {
             c &lt;- futureList
             }yield c
  data onSuccess {
    case x =&gt; (x filter (d=&gt; d.condition)).head
  }
  </code></pre>
  
  <p>But it's not efficient, because I'll take only one element of the list, but computed all of them with a lot of latency.</p>
  
  <p>I know <code>firstCompletedOf</code> but it's not what I'm searching.</p>
  
  <p>(Sorry for my bad English.)</p>