slice()
slice(
start
): (end
) => <T
>(arr
) =>T
[]
Returns a new array containing elements between start
and end
(exclusive)
from the original array.
Parameters
start
number
The index to start at (inclusive).
Returns
(
end
): <T
>(arr
) =>T
[]
Parameters
end
number
Returns
<
T
>(arr
):T
[]
Type Parameters
T
T
Parameters
arr
T
[]
Returns
T
[]
Remarks
pure function
Example
import { slice } from '@accelint/core';
slice(0)(4)([1, 2, 3, 4, 5, 6]);
// [1, 2, 3, 4]