UNPKG

@thi.ng/transducers

Version:

Collection of ~170 lightweight, composable transducers, reducers, generators, iterators for functional data transformations

11 lines (10 loc) 279 B
import { comp } from "./comp.js"; import { drop } from "./drop.js"; import { __iter } from "./iterator.js"; import { take } from "./take.js"; function page(...args) { return __iter(page, args) || comp(drop(args[0] * (args[1] || 10)), take(args[1] || 10)); } export { page };