export function* interleaveRows2d(opts: InterleaveOpts2D) {
    const { cols, rows, tx } = __opts(opts);
    const step = (opts.step != null ? opts.step : 2) | 0;
    for (let j = 0; j < step; j++) {
        yield* map((p) => tx(p[0], p[1]), range2d(0, cols, j, rows, 1, step));