Skip to content

Instantly share code, notes, and snippets.

View simonracz's full-sized avatar

Simon Racz simonracz

  • Amsterdam
View GitHub Profile
@simonracz
simonracz / gist:fa2b9267ce07278d926d
Created January 8, 2016 13:19
Add non-updating insert methods to swift Set
import Foundation
extension Set {
mutating func nonUpdatingInsert(member: Element) {
if !self.contains(member) {
self.insert(member)
}
}