Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 4x 7x 1x 2x 2x 3x 2x | export const interleave = <E>(arr1: E[]) => (arr2: E[]) => { if (arr1.length !== arr2.length) { throw new Error('Input arrays must have equal lengths'); } const result: E[] = []; for (let i = 0; i < arr1.length; i++) { result.push(arr1[i], arr2[i]); } return result; }; |