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

Function loop

packages/effect/src/Stream.ts:5898–5909  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5896 unwrap(Effect.map(Schedule.toStepWithMetadata(schedule), (step) => {
5897 let meta = Schedule.CurrentMetadata.defaultValue()
5898 const loop = (): Stream<A, E | E2, R | R2> =>
5899 catch_(
5900 provideServiceEffect(self, Schedule.CurrentMetadata, Effect.sync(() => meta)),
5901 (error) =>
5902 unwrap(Pull.catchDone(
5903 Effect.map(step(error), (meta_) => {
5904 meta = meta_
5905 return unwrap(Effect.as(Effect.yieldNow, loop()))
5906 }),
5907 () => Effect.succeed(fail(error))
5908 ))
5909 )
5910 return loop()
5911 }))
5912

Callers 4

takeAllFunction · 0.70
releaseFunction · 0.70
paginateFunction · 0.70
Stream.tsFile · 0.70

Calls 6

unwrapFunction · 0.70
stepFunction · 0.70
failFunction · 0.70
syncMethod · 0.45
mapMethod · 0.45
succeedMethod · 0.45

Tested by

no test coverage detected