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!