RosettaCodeData/Task/Generic-swap/Swift/generic-swap.swift
2023-07-01 13:44:08 -04:00

3 lines
59 B
Swift

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