Function slice

Curriefied version of Array.prototype.slice

const source = [1, 2, 3];
slice(0, 1)(source) // [1] with type number[]
  • Parameters

    • Optionalstart: number
    • Optionalend: number

    Returns (<T>(arr: readonly T[]) => T[])

      • <T>(arr): T[]
      • Type Parameters

        • T

        Parameters

        • arr: readonly T[]

        Returns T[]