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

Function onItem

packages/effect/src/internal/effect.ts:4895–4904  ·  view source on GitHub ↗
(
    state: {
      readonly f: (a: any, i: number) => Effect.Effect<any, any, any>
      readonly out: Array<any> | undefined
    },
    item,
    index
  )

Source from the content-addressed store, hash-verified

4893
4894const forEachConcurrent = iterateEagerImpl({
4895 onItem(
4896 state: {
4897 readonly f: (a: any, i: number) => Effect.Effect<any, any, any>
4898 readonly out: Array<any> | undefined
4899 },
4900 item,
4901 index
4902 ) {
4903 return state.f(item, index)
4904 },
4905 step(state, _, exit, index) {
4906 if (exit._tag === "Failure") return exit
4907 else if (state.out) {

Callers 2

runSequentialFunction · 0.70
goFunction · 0.70

Calls 1

fMethod · 0.80

Tested by

no test coverage detected