Package: effect
Module: Channel
Creates a Channel from an iterator.
Example (Creating channels from iterators)
import { Channel } from "effect"
const numbers = [1, 2, 3, 4, 5]
const channel = Channel.fromIterator(() => numbers[Symbol.iterator]())
// Emits: 1, 2, 3, 4, 5
Signature
declare const fromIterator: <A, L>(iterator: LazyArg<Iterator<A, L>>) => Channel<A, never, L>
Since v4.0.0