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

Function runStep

packages/effect/src/internal/effect.ts:4755–4767  ·  view source on GitHub ↗
(item: A, exit: Exit.Exit<X, E>, currentIndex: number)

Source from the content-addressed store, hash-verified

4753 }
4754
4755 const runStep = (item: A, exit: Exit.Exit<X, E>, currentIndex: number): Exit.Exit<void, E | E2> | void => {
4756 if (!orderedStep) return step(state, item, exit, currentIndex)
4757 if (terminal) return terminal
4758 exits![currentIndex] = exit
4759 while (nextIndex < end) {
4760 const nextExit = exits![nextIndex]
4761 if (nextExit === undefined) return
4762 exits![nextIndex] = undefined
4763 const index = nextIndex++
4764 const result = step(state, items[index], nextExit, index)
4765 if (result) return result
4766 }
4767 }
4768
4769 const go = (): Effect.Effect<void, E | E2, R> | undefined => {
4770 let paused = false

Callers 1

goFunction · 0.85

Calls 1

stepFunction · 0.70

Tested by

no test coverage detected