Mojo function
swap
swap[T: Movable](mut lhs: T, mut rhs: T)
Swaps the two given arguments.
Parameters:
- T (
Movable
): Constrained to Movable types.
Args:
- lhs (
T
): Argument value swapped with rhs. - rhs (
T
): Argument value swapped with lhs.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!