MCPcopy Create free account
hub / github.com/effect-app/libs / fromIterator

Function fromIterator

repos/effect/packages/effect/src/Channel.ts:639–648  ·  view source on GitHub ↗
(iterator: LazyArg<Iterator<A, L>>)

Source from the content-addressed store, hash-verified

637): Channel<Z, E, void, unknown, unknown, unknown, R> =>
638 unwrap(Effect.map(
639 Effect.acquireRelease(self, release),
640 succeed
641 )))
642
643/**
644 * Creates a `Channel` from an iterator.
645 *
646 * **Example** (Creating channels from iterators)
647 *
648 * ```ts import.meta.vitest
649 * import { Channel, Effect } from "effect"
650 *
651 * const numbers = [1, 2, 3, 4, 5]

Callers 1

fromIterableFunction · 0.85

Calls 5

syncMethod · 0.80
doneMethod · 0.80
fromPullFunction · 0.70
nextMethod · 0.65
succeedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…