Returns the first element of the sequence that satisfies the given
predicate.</p>

<p>The following example uses the <code>first(where:)</code> method to find the first
negative number in an array of integers:</p>

<pre><code class="language-swift">let numbers = [3, 7, 4, -2, 9, -6, 10, 1]
if let firstNegative = numbers.first(where: { $0 &lt; 0 }) {
    print(&quot;The first negative number is \(firstNegative).&quot;)
}
// Prints &quot;The first negative number is -2.&quot;</code></pre>

<p><strong><code>pr