slice an array (or string) at the provided flattened 2-tuple of (interval starting index, interval length).
const arr = Array(100).map((v, i) => i) // === [0, 1, 2, ..., 99]const slices: IntervalLengths = [0, 10, 20, 10, 90, undefined, 15, 70]sliceIntervalLengths(arr, slices) // === [[0, 1, 2, ..., 9], [20, 21, ..., 29], [90, ..., 99], [15, ..., 84]] Copy
const arr = Array(100).map((v, i) => i) // === [0, 1, 2, ..., 99]const slices: IntervalLengths = [0, 10, 20, 10, 90, undefined, 15, 70]sliceIntervalLengths(arr, slices) // === [[0, 1, 2, ..., 9], [20, 21, ..., 29], [90, ..., 99], [15, ..., 84]]
slice an array (or string) at the provided flattened 2-tuple of (interval starting index, interval length).
Example