source: node_modules/ramda/es/internal/_xtakeWhile.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: 618 bytes
RevLine 
[d24f17c]1import _reduced from "./_reduced.js";
2import _xfBase from "./_xfBase.js";
3
4var XTakeWhile =
5/*#__PURE__*/
6function () {
7 function XTakeWhile(f, xf) {
8 this.xf = xf;
9 this.f = f;
10 }
11
12 XTakeWhile.prototype['@@transducer/init'] = _xfBase.init;
13 XTakeWhile.prototype['@@transducer/result'] = _xfBase.result;
14
15 XTakeWhile.prototype['@@transducer/step'] = function (result, input) {
16 return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result);
17 };
18
19 return XTakeWhile;
20}();
21
22export default function _xtakeWhile(f) {
23 return function (xf) {
24 return new XTakeWhile(f, xf);
25 };
26}
Note: See TracBrowser for help on using the repository browser.