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

Function paginateEffect

packages/effect/src/internal/stream.ts:4566–4570  ·  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

4564
4565/** @internal */
4566export const paginateEffect = <S, A, E, R>(
4567 s: S,
4568 f: (s: S) => Effect.Effect<readonly [A, Option.Option<S>], E, R>
4569): Stream.Stream<A, E, R> =>
4570 paginateChunkEffect(s, (s) => pipe(f(s), Effect.map(([a, s]) => [Chunk.of(a), s] as const)))
4571
4572/** @internal */
4573export 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