Yield the original sequence unmodified, calling the tapper on every item in the sequence
function tap(tapper) {
    return function (it) {
        return __asyncGenerator(this, arguments, function* () {
            var e_1, _a;
            let index = 0;
            try {
                for (var it_1 = __asyncValues(it), it_1_1; it_1_1 = yield __await(it_1.next()), !it_1_1.done;) {
                    const value = it_1_1.value;
                    yield __await(tapper(value, index));
                    yield yield __await(value);
                    index = index + 1;
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (it_1_1 && !it_1_1.done && (_a = it_1.return)) yield __await(_a.call(it_1));
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
    };
}