MCPcopy Index your code
hub / github.com/Effect-TS/effect / collectAllToSet

Function collectAllToSet

packages/effect/src/internal/sink.ts:162–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160
161/** @internal */
162export const collectAllToSet = <In>(): Sink.Sink<HashSet.HashSet<In>, In> =>
163 foldLeftChunks<HashSet.HashSet<In>, In>(
164 HashSet.empty(),
165 (acc, chunk) => pipe(chunk, Chunk.reduce(acc, (acc, input) => pipe(acc, HashSet.add(input))))
166 )
167
168/** @internal */
169export const collectAllToSetN = <In>(n: number): Sink.Sink<HashSet.HashSet<In>, In, In> =>

Callers

nothing calls this directly

Calls 3

foldLeftChunksFunction · 0.85
pipeFunction · 0.70
addMethod · 0.65

Tested by

no test coverage detected