You don’t have to reduce an array to get it into a set; just create the set with an array: let objectSet = Set(objects.map { $0.URL })
.
You don’t have to reduce an array to get it into a set; just create the set with an array: let objectSet = Set(objects.map { $0.URL })
.