Function moveWithin$

  • Move part of array within!

    Type Parameters

    • T

    Parameters

    • x: T[]

      an array (updated!)

    • j: number = 0

      write ±index [0]

    • i: number = 0

      read begin ±index [0]

    • I: number = x.length

      read end ±index [|x|]

    Returns T[]

    x = x[0..j] ⧺ x[i..I] ⧺ x[j..i] ⧺ x[I..]

Generated using TypeDoc