a set of days of the week.</p>
<pre><code class="language-swift">enum DayOfTheWeek: Int {
    case sunday, monday, tuesday, wednesday, thursday,
        friday, saturday
}

var classDays: Set&lt;DayOfTheWeek&gt; = [.monday, .wednesday, .friday]
print(classDays.update(with: .monday))
// Prints &quot;Optional(.monday)&quot;
</code></pre>
<ul>
<li>Parameter newMember: An element to insert into the set.</li>
</ul>
<h4>Declaration</h4><code class="language-swift">mutating func update(with newMember: Self.Element