// ets_tracing: off
import * as CK from "../../../../Collections/Immutable/Chunk";
import * as Tp from "../../../../Collections/Immutable/Tuple";
import * as T from "../../../../Effect";
import * as PaginateChunkEffect from "./paginateChunkEffect";
/**
 * Like `unfoldEff`, but allows the emission of values to end one step further than
 * the unfolding of the state. This is useful for embedding paginated APIs,
 * hence the name.
 */

export function paginateEffect(s, f) {
  return PaginateChunkEffect.paginateChunkEffect(s, _ => T.map_(f(_), ({
    tuple: [a, s]
  }) => Tp.tuple(CK.single(a), s)));
}
//# sourceMappingURL=paginateEffect.js.map