MCPcopy Index your code
hub / github.com/Effect-TS/effect / paginateEffect

Function paginateEffect

packages/effect/src/internal/stream.ts:4528–4532  ·  view source on GitHub ↗
(
  s: S,
  f: (s: S) => Effect.Effect<readonly [A, Option.Option<S>], E, R>
)

Source from the content-addressed store, hash-verified

4526
4527/** @internal */
4528export const paginateEffect = <S, A, E, R>(
4529 s: S,
4530 f: (s: S) => Effect.Effect<readonly [A, Option.Option<S>], E, R>
4531): Stream.Stream<A, E, R> =>
4532 paginateChunkEffect(s, (s) => pipe(f(s), Effect.map(([a, s]) => [Chunk.of(a), s] as const)))
4533
4534/** @internal */
4535export const peel = dual<

Callers 1

Calls 5

paginateChunkEffectFunction · 0.85
pipeFunction · 0.70
mapMethod · 0.65
ofMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected