effect-io-ai

Package: effect
Module: Array

Array.forEach

Performs a side-effect for each element of the Iterable.

Example

import { Array } from "effect"

Array.forEach([1, 2, 3], n => console.log(n)) // 1, 2, 3

Signature

declare const forEach: { <A>(f: (a: A, i: number) => void): (self: Iterable<A>) => void; <A>(self: Iterable<A>, f: (a: A, i: number) => void): void; }

Source

Since v2.0.0