Hyperlinkv0.8.0-beta.28

Channel

Channel.fromIterableconsteffect/Channel.ts:778
<A, L>(iterable: Iterable<A, L>): Channel<A, never, L>

Creates a Channel that emits all elements from an iterable.

Example (Creating channels from iterables)

import { Channel } from "effect"

const set = new Set([1, 2, 3])
const channel = Channel.fromIterable(set)
// Emits: 1, 2, 3
constructors
Source effect/Channel.ts:7782 lines
export const fromIterable = <A, L>(iterable: Iterable<A, L>): Channel<A, never, L> =>
  fromIterator(() => iterable[Symbol.iterator]())