swap package:massiv
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.
O(1) - Swap two elements in a mutable array under the supplied
indices. Throws an
IndexOutOfBoundsException when either one of
the indices is out of bounds and elements under those indices
otherwise.
O(1) - Same as
swapM, but discard the returned elements
O(1) - Same as
swap, but instead of returning
Nothing it does nothing. In other words, it is similar to
swapM_, but does not throw any exceptions.
Swap elements in the intersection of two mutable arrays starting at
the initial index.
Swap two elements in a mutable array under the supplied linear
indices. Returns the previous values.
Swap two elements in a mutable array under the supplied indices.
Returns the previous values.