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

forEach

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

Execute a side effect for each element of an Iterable.

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

const numbers = I.wrap(1, 2, 3, 4, 5);
I.forEach((n: number) => console.log(`Number: ${n}`))(numbers);
// Logs: Number: 1, Number: 2, Number: 3, Number: 4, Number: 5
function forEach<A>(fa: (a: A) => void): (ta: Iterable<A>) => void;
§
forEach<A>(fa: (a: A) => void): (ta: Iterable<A>) => void
[src]

§Type Parameters

§Parameters

§
fa: (a: A) => void
[src]

§Return Type

§
(ta: Iterable<A>) => void
[src]