UNPKG

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