t of this sequence.</p>
<p>Use this method to receive an array of non-optional values when your
transformation produces an optional value.</p>
<p>In this example, note the difference in the result of using <code>map</code> and
<code>compactMap</code> with a transformation that returns an optional <code>Int</code> value.</p>
<pre><code class="language-swift">let possibleNumbers = [&quot;1&quot;, &quot;2&quot;, &quot;three&quot;, &quot;///4///&quot;, &quot;5&quot;]

let mapped: [Int?] = possibleNumbers.map { 