Skip to content

fx-flow v0.7.0 / pipe/strict / each

Function: each()

each(fn, iterable)

each<A, R>(fn, iterable): void

Iterates over Iterable/AsyncIterable, applying each in turn to fn.

Type parameters

A

R = unknown

Parameters

fn

iterable: Iterable<A>

Returns

void

Example

typescript
each(console.log, [1, 2, 3]); // log 1, 2, 3

More examples

Source

packages/core/src/pipe/strict/each.ts:29

each(fn, iterable)

each<A, R>(fn, iterable): Promise<void>

Type parameters

A

R = unknown

Parameters

fn

iterable: AsyncIterable<A>

Returns

Promise<void>

Source

packages/core/src/pipe/strict/each.ts:31

each(fn)

each<A, R>(fn): (iterable) => IterableReturnValue<UniversalIterable<A>, void>

Type parameters

A

R = unknown

Parameters

fn

Returns

Function

Parameters

iterable: UniversalIterable<A>

Returns

IterableReturnValue<UniversalIterable<A>, void>

Source

packages/core/src/pipe/strict/each.ts:33

Released under the MIT License.