MCPcopy Create free account
hub / github.com/Effect-TS/effect / fromIterable

Function fromIterable

packages/effect/src/TxHashSet.ts:246–251  ·  view source on GitHub ↗
(values: Iterable<V>)

Source from the content-addressed store, hash-verified

244 * @since 2.0.0
245 */
246export const fromIterable = <V>(values: Iterable<V>): Effect.Effect<TxHashSet<V>> =>
247 Effect.gen(function*() {
248 const hashSet = HashSet.fromIterable(values)
249 const ref = yield* TxRef.make(hashSet)
250 return makeTxHashSet(ref)
251 })
252
253/**
254 * Creates a TxHashSet from an existing HashSet.

Callers

nothing calls this directly

Calls 2

makeTxHashSetFunction · 0.85
makeMethod · 0.65

Tested by

no test coverage detected