UNPKG

@thi.ng/transducers

Version:

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

11 lines (10 loc) 174 B
function* repeatedly2d(fn, cols, rows) { for (let y = 0; y < rows; y++) { for (let x = 0; x < cols; x++) { yield fn(x, y); } } } export { repeatedly2d };