Returns first n elements of array

  • Type Parameters

    • T

    Parameters

    • n: number

      Number of elements to take

    • xs: T[]

      Input array

    Returns T[]

    Array of first n elements