effect-io-ai

Package: effect
Module: Iterable

Iterable.forever

Repeats an iterable without an upper bound.

When to use

Use to cycle a reusable iterable without an upper bound when a downstream consumer controls how many values are taken.

Gotchas

The returned iterable is lazy and should usually be bounded with take or another terminating consumer before materializing it.

See

Signature

declare const forever: <A>(self: Iterable<A>) => Iterable<A>

Source

Since v4.0.0