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

Function paginate

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

Source from the content-addressed store, hash-verified

4488
4489/** @internal */
4490export const paginate = <S, A>(s: S, f: (s: S) => readonly [A, Option.Option<S>]): Stream.Stream<A> =>
4491 paginateChunk(s, (s) => {
4492 const page = f(s)
4493 return [Chunk.of(page[0]), page[1]] as const
4494 })
4495
4496/** @internal */
4497export const paginateChunk = <S, A>(

Callers

nothing calls this directly

Calls 3

paginateChunkFunction · 0.85
ofMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected