p>This example iterates over the indices and elements of a set, building a
list consisting of indices of names with five or fewer letters.</p>
<pre><code class="language-swift">let names: Set = [&quot;Sofia&quot;, &quot;Camilla&quot;, &quot;Martina&quot;, &quot;Mateo&quot;, &quot;Nicolás&quot;]
var shorterIndices: [Set&lt;String&gt;.Index] = []
for (i, name) in zip(names.indices, names) {
    if name.count &lt;= 5 {
        shorterIndices.append(i)
    }
}
</code></pre>
<p>Now that the <code>shorterIndices