UNPKG

iter-tools-es

Version:
15 lines (12 loc) 269 B
const { iterableCurry } = require('../../internal/iterable.js'); function* __map(source, func) { let c = 0; for (const value of source) { yield func(value, c++); } } exports.__map = __map; const map = /*#__PURE__*/iterableCurry(__map); exports.map = map;