UNPKG

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