UNPKG

@thi.ng/transducers

Version:

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

9 lines (8 loc) 121 B
function* repeatedly(fn, n = Infinity) { for (let i = 0; i < n; i++) { yield fn(i); } } export { repeatedly };