function
swap
swap[T: Movable](inout lhs: T, inout rhs: T)
Swaps the two given arguments.
Parameters:
- T (
Movable
): Constrained to Copyable types.
Args:
- lhs (
T
): Argument value swapped with rhs. - rhs (
T
): Argument value swapped with lhs.
function
swap[T: Movable](inout lhs: T, inout rhs: T)
Swaps the two given arguments.
Parameters:
Movable
): Constrained to Copyable types.Args:
T
): Argument value swapped with rhs.T
): Argument value swapped with lhs.