Takes the first N elements from an array.
const values = [1, 2, 3, 4];const firstTwo = Arr.take(values, 2);const firstThree = Arr.take(3)(values);assert.deepStrictEqual(firstTwo, [1, 2]);assert.deepStrictEqual(firstThree, [1, 2, 3]); Copy
const values = [1, 2, 3, 4];const firstTwo = Arr.take(values, 2);const firstThree = Arr.take(3)(values);assert.deepStrictEqual(firstTwo, [1, 2]);assert.deepStrictEqual(firstThree, [1, 2, 3]);
Takes the first N elements from an array.