swap -package:massiv

Swap the components of a pair.
Swap the elements at the given positions.
Swap the elements at the given positions.
Swap the elements at the given positions.
Swap the elements at the given positions.
Swap the elements at the given positions.
Analogous to swap from Data.Tuple
Swap the elements of the mutable array at the given indices.
O(1) Swap the elements at given type-safe positions using Finites.
O(1) Swap the elements at the given type-safe positions using Finites.
O(1) Swap the elements at the given type-safe positions using Finites.
O(1) Swap the elements at the given type-safe positions using Finites.
O(1) Swap the elements at the given type-safe positions using Finites.
Swap the parts of a given graph. Complexity: O(1) time and memory.
swap empty            == empty
swap . leftVertex     == rightVertex
swap (vertices xs ys) == vertices ys xs
swap (edge x y)       == edge y x
swap . edges          == edges . map Data.Tuple.swap
swap . swap           == id
Convert an Unfold that accepts a tuple as an argument into an unfold that accepts a tuple with elements swapped.
swap = Unfold.lmap Tuple.swap
Pre-release
Swap the elements of a 2-tuple
Swaps two elements in the RC4 array.
QC.forAll (QC.choose (1,100)) $ \dim ->
QC.forAll (QC.choose (0, dim-1)) $ \i ->
QC.forAll (QC.choose (0, dim-1)) $ \j ->
Vector.unit (Shape.ZeroBased dim) i
==
(Vector.swap i j (Vector.unit (Shape.ZeroBased dim) j) :: Vector Number_)
swap a i j exchanges the positions of values at i and j of a.
Swap the positions of two songs.