title: How to resolve a list of futures in Scala
body: <p>I have a call that returns a Future.
  However, I need to make n calls so I will get back n futures. I am wondering how I would get the futures to all resolve before proceeding (without blocking the server) </p>
  
  <p>For example, </p>
  
  <pre><code>while(counter &lt; numCalls){
      val future = call(counter)
      future.map{  x =&gt;
          //do stuff
      }
      counter += 1 
  }
  
  //Now I want to execute code here after ALL the futures are resolved without 
  //blocking the server
  </code></pre>