forEach
import { forEach } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_iterable.ts";Execute side effects for each value in an AsyncIterable.
@example
import { forEach } from "./async_iterable.ts";
import { fromIterable } from "./async_iterable.ts";
const numbers = fromIterable([1, 2, 3, 4, 5]);
await forEach(
(n) => console.log(`Processing: ${n}`),
() => console.log("Done!")
)(numbers);
function forEach<A>(onValue: (a: A) => unknown | PromiseLike<unknown>, onDone?: () => unknown | PromiseLike<unknown>): (ta: AsyncIterable<A>) => PromiseLike<void>;