server-json/node_modules/ramda/es/internal/_xArrayReduce.js
2024-11-01 08:00:42 +00:00

13 lines
No EOL
332 B
JavaScript

export default function _xArrayReduce(xf, acc, list) {
var idx = 0;
var len = list.length;
while (idx < len) {
acc = xf['@@transducer/step'](acc, list[idx]);
if (acc && acc['@@transducer/reduced']) {
acc = acc['@@transducer/value'];
break;
}
idx += 1;
}
return xf['@@transducer/result'](acc);
}