title: Remove the last occurrence of an element in a Swift array
body: <p>I need to remove the last occurrence of a specific element in a [Bool] Array. For example in JavaScript this would be:</p>
  
  <pre><code>var k = [true, true, false];
  k.splice(k.lastIndexOf(true), 1);
  ==&gt; [true, false]
  </code></pre>
  
  <p>How would I achieve the same behavior in Swift?</p>