Function rotate

  • Rotate values in array.

    Type Parameters

    • T

    Parameters

    • x: T[]

      an array

    • n: number = 0

      rotate amount (+ve: left, -ve: right) [0]

    Returns T[]

    x[n..] ⧺ x[0..n]

Generated using TypeDoc