title: Swift 3 Array, remove more than one item at once, with .remove(at: i)
body: <p>Is it possible to remove more than one item from an array, at the same time, using index locations as per .remove(at: i) kind of like:</p>
  
  <p>Pseudo code:</p>
  
  <pre><code>myArray.remove(at: 3, 5, 8, 12)
  </code></pre>
  
  <p>And if so, what's the syntax for doing this?</p>
  
  <hr>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>I was trying this, it worked, but the extension in the answer below is much more readable, and sensible, and achieves the goal of one that's exactly as the pseudo code.</p>
  
  <p>an array of "positions" is created: [3, 5, 8, 12]</p>
  
  <pre><code>let sorted = positions.sorted(by: { $1 &lt; $0 })
  for index in sorted
  {
      myArray.remove(at: index)
  }
  </code></pre>