esday, wednesday, thursday,
        friday, saturday
}

var classDays: Set&lt;DayOfTheWeek&gt; = [.wednesday, .friday]
print(classDays.insert(.monday))
// Prints &quot;(true, .monday)&quot;
print(classDays)
// Prints &quot;[.friday, .wednesday, .monday]&quot;

print(classDays.insert(.friday))
// Prints &quot;(false, .friday)&quot;
print(classDays)
// Prints &quot;[.friday, .wednesday, .monday]&quot;
</code></pre>
<ul>
<li>Parameter newMember: An element to insert into the set.</li>
</ul>
<h4>Declaration</h4