"comment collapse in" id="comment-init-00a2b987552997ee43208aca83ac6ae6"><p>Creates a new set from a finite sequence of items.</p>
<p>Use this initializer to create a new set from an existing sequence, like
an array or a range:</p>
<pre><code class="language-swift">let validIndices = Set(0..&lt;7).subtracting([2, 4, 5])
print(validIndices)
// Prints &quot;[6, 0, 1, 3]&quot;
</code></pre>
<ul>
<li>Parameter sequence: The elements to use as members of the new set.</li>
</ul>
<h4>Declaration</h4><code class="l