UNPKG

745 BJavaScriptView Raw
1var _curry2 =
2/*#__PURE__*/
3require("./_curry2");
4
5var _xfBase =
6/*#__PURE__*/
7require("./_xfBase");
8
9var XDropWhile =
10/*#__PURE__*/
11function () {
12 function XDropWhile(f, xf) {
13 this.xf = xf;
14 this.f = f;
15 }
16
17 XDropWhile.prototype['@@transducer/init'] = _xfBase.init;
18 XDropWhile.prototype['@@transducer/result'] = _xfBase.result;
19
20 XDropWhile.prototype['@@transducer/step'] = function (result, input) {
21 if (this.f) {
22 if (this.f(input)) {
23 return result;
24 }
25
26 this.f = null;
27 }
28
29 return this.xf['@@transducer/step'](result, input);
30 };
31
32 return XDropWhile;
33}();
34
35var _xdropWhile =
36/*#__PURE__*/
37_curry2(function _xdropWhile(f, xf) {
38 return new XDropWhile(f, xf);
39});
40
41module.exports = _xdropWhile;
\No newline at end of file