title: Variable number of Futures
body: <p>I have to perform some actions on a 2D List in Scala, and I'm trying to paralelize that task. </p>
  
  <p>Currently I have three Futures, where each takes N lines of the matrix and performs the necessary calculations. It's written like this:</p>
  
  <pre><code>val future1: Future[List[Int]] = Future { makeCalculations(0, 5) }
  val future2: Future[List[Int]] = Future { makeCalculations(6, 10) }
  val future3: Future[List[Int]] = Future { makeCalculations(11, 15) }
  </code></pre>
  
  <p>And then I start them at the same time using a for comprehension that yields a list of the returned values.</p>
  
  <p>The thing is, I want this to be dynamic by passing an Int to this function and having it create that exact number of futures.</p>
  
  <p>I tried having a for comprehension to yield the futures but it seems like they are started sequentially and I want them to start at the same time. Am I looking in the wrong place? Is there a better way to do this?</p>