effect-io-ai

Package: effect
Module: Channel

Channel.fromArray

Creates a Channel that emits all elements from an array.

Example (Creating channels from arrays)

import { Channel } from "effect"

const channel = Channel.fromArray([1, 2, 3, 4, 5])
// Emits: 1, 2, 3, 4, 5

Signature

declare const fromArray: <A>(array: ReadonlyArray<A>) => Channel<A>

Source

Since v4.0.0