title: How to create a collection of Identifiable objects similar to Set?
body: <p>A <code>Set</code> is great for avoiding duplicates, unions, and other operations. However, objects shouldn't be <code>Hashable</code> because the changes in the object will cause duplicates in a <code>Set</code>. </p>
  
  <p>There is a <code>List</code> in SwiftUI that uses the <code>Identifiable</code> protocol to manage the collection, but is geared towards views. Is there collection that operates the same way?</p>
  
  <p>For example, for the following object, I'd like to manage a collection:</p>
  
  <pre><code>struct Parcel: Identifiable, Hashable {
      let id: String
      var location: Int?
  }
  
  var item = Parcel(id: "123")
  var list: Set&lt;Parcel&gt; = [item]
  </code></pre>
  
  <p>Later, I mutate item's location and update the list:</p>
  
  <pre><code>item.location = 33435
  list.update(with: item)
  </code></pre>
  
  <p>This adds a duplicate item to the list since the hash has changed, but isn't intended since it has the same identifier. Is there a good way to handle a collection of <code>Identifiable</code> objects?</p>