source: node_modules/ramda/src/internal/_xArrayReduce.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 354 bytes
Line 
1function _xArrayReduce(xf, acc, list) {
2 var idx = 0;
3 var len = list.length;
4
5 while (idx < len) {
6 acc = xf['@@transducer/step'](acc, list[idx]);
7
8 if (acc && acc['@@transducer/reduced']) {
9 acc = acc['@@transducer/value'];
10 break;
11 }
12
13 idx += 1;
14 }
15
16 return xf['@@transducer/result'](acc);
17}
18
19module.exports = _xArrayReduce;
Note: See TracBrowser for help on using the repository browser.