RosettaCodeData/Task/Generic-swap/Swift/generic-swap.swift
2016-12-05 23:44:36 +01:00

3 lines
59 B
Swift

func swap<T>(inout a: T, inout b: T) {
(a, b) = (b, a)
}