swap

func swap(_:_:)(_ a: inout T, _ b: inout T)

Exchanges the values of the two arguments.

The two arguments must not alias each other. To swap two elements of a mutable collection, use the swapAt(_:_:) method of that collection instead of this function.