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

Function returnNextElement

packages/effect/src/internal/fiberRuntime.ts:2291–2299  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2289 const a = todos.pop()!
2290 let index = counter++
2291 const returnNextElement = () => {
2292 const a = todos.pop()!
2293 index = counter++
2294 return core.flatMap(core.yieldNow(), () =>
2295 core.flatMap(
2296 stepOrExit(restore(f(a, index))),
2297 onRes
2298 ))
2299 }
2300 const onRes = (
2301 res: Exit.Exit<X, E> | Effect.Blocked<X, E>
2302 ): Effect.Effect<Exit.Exit<X, E> | Effect.Blocked<X, E>, never, R> => {

Callers 1

onResFunction · 0.85

Calls 2

restoreFunction · 0.85
fFunction · 0.50

Tested by

no test coverage detected