Skip to main content
Module

x/ahh/mod.ts>I.forEach

Idiomatic type-safety functions.
Go to Latest
method I.forEach
import { I } from "https://deno.land/x/ahh@v0.10.1/mod.ts";

Consumes an Iterator and runs f on each item.

Examples

import { I } from "./mod.ts";

const iter = I.iter([1, 2, 3]);

I.forEach(iter, (i) => console.log(i));
console.log(iter.next()); // undefined

Parameters

iter: Iterator<T>
f: (_: T) => void