@mirei/ts-collections
    Preparing search index...

    Function swap

    • Swaps the elements of the list at the given indices.

      Type Parameters

      • TElement

      Parameters

      • sequence: IList<TElement> | TElement[]

        The list or array whose two elements will be swapped

      • firstIndex: number

        The first index of the swap operation

      • secondIndex: number

        The second index of the swap operation

      Returns void

      If the given indices are out of bounds.