Accessing Set elements is fast, and Set type must to be hashable.
I thought so Swift store only hashed-value of each element, but I fount the raw value (not hashed) could also be accessed. e.g like this:
var favoriteGenres: Set<String> = ["Rock", "Classical", "Hip hop"]
for genre in favoriteGenres {
print("\(genre)")
}
Output:
// Jazz
// Hip hop
// Classical
How does swift store Set type in memory And access it?