Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

tap

import { tap } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/iterable.ts";

Execute a side effect on each element of an Iterable and return the original Iterable unchanged.

@example
import * as I from "./iterable.ts";

const numbers = I.wrap(1, 2, 3, 4, 5);
const logged = I.tap((n: number) => console.log(`Processing: ${n}`))(numbers);
// Logs: Processing: 1, Processing: 2, Processing: 3, Processing: 4, Processing: 5
// Returns: Iterable<number>
const tap: Tap<KindIterable>;