UNPKG

@thi.ng/transducers

Version:

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

10 lines (9 loc) 229 B
import { map } from "./map.js"; import { normRange } from "./norm-range.js"; const line = (start, end, steps = 10) => { const delta = end - start; return map((t) => start + delta * t, normRange(steps)); }; export { line };