Sets operations in Swift

Forums:

let first: Set = [123]
let second: Set = [345]

var third = first.union(second)
//third is [1, 2, 3, 4, 5]

third = first.subtract(second)
//third is [1, 2]

third = first.intersect(second)
//third is [3]

third = first.exclusiveOr(second)
//third is [1, 2, 4, 5]