title: Map/reduce with index in Swift 4
body: <p>How would one go about accomplishing something like the following in a more elegant way in Swift 4 e.g using map and/or reduce. </p>
  
  <p>I've simplified the code for the sake of posting here, but note it does require the use of an index.</p>
  
  <pre><code>var numbers = [50, 20, 70, 80, 90]
  var result = [0,0,0]
  for number in numbers {
    for i in 0...2 {
      result[i] += number + i
    } 
  }
  </code></pre>
  
  <p>The end result should be:</p>
  
  <pre><code>[Int] = 3 values {
    [0] = 310
    [1] = 315
    [2] = 320
  }
  </code></pre>