swap -package:streamly-core
base Data.Tuple,
extra Data.Tuple.Extra,
base-compat Data.Tuple.Compat,
protolude Protolude,
relude Relude.Container.Reexport,
base-prelude BasePrelude,
classy-prelude ClassyPrelude,
basic-prelude CorePrelude,
ihaskell IHaskellPrelude,
base-compat-batteries Data.Tuple.Compat,
foundation Foundation,
Agda Agda.Utils.Tuple,
ghc-internal GHC.Internal.Data.Tuple,
rebase Rebase.Prelude 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.
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.
O(1) - Same as
swapM, but instead of throwing an
exception returns
Nothing when either one of the indices is out
of bounds and
Just elements under those indices otherwise.
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.