MCPcopy
hub / github.com/Effect-TS/effect / fromFunctionBatched

Function fromFunctionBatched

packages/effect/src/internal/dataSource.ts:220–229  ·  view source on GitHub ↗
(
  f: (chunk: RA.NonEmptyArray<A>) => Iterable<Request.Request.Success<A>>
)

Source from the content-addressed store, hash-verified

218
219/** @internal */
220export const fromFunctionBatched = <A extends Request.Request<any>>(
221 f: (chunk: RA.NonEmptyArray<A>) => Iterable<Request.Request.Success<A>>
222): RequestResolver.RequestResolver<A> =>
223 makeBatched((as: RA.NonEmptyArray<A>) =>
224 Effect.forEach(
225 f(as),
226 (res, i) => complete(as[i], core.exitSucceed(res) as any),
227 { discard: true }
228 )
229 ).identified("FromFunctionBatched", f)
230
231/** @internal */
232export const fromEffect = <R, A extends Request.Request<any, any>>(

Callers

nothing calls this directly

Calls 4

makeBatchedFunction · 0.70
completeFunction · 0.70
identifiedMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected