Skip to main content
Module

x/ahh/mod.ts>Iterator#forEach

Opinionated idiomatic type-safety functions.
Go to Latest
method Iterator.prototype.forEach
import { Iterator } from "https://deno.land/x/ahh@v0.12.0/mod.ts";

Consumes an Iterator and calls fn on each item.

Examples

Example 1

import { default as I } from "./iterator.ts";

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

iter.forEach((value) => console.log(value));

Parameters

fn: (_: T) => unknown