1 | var _curry2 =
|
2 |
|
3 | require("./_curry2");
|
4 |
|
5 | var _xfBase =
|
6 |
|
7 | require("./_xfBase");
|
8 |
|
9 | var XFilter =
|
10 |
|
11 | function () {
|
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 |
|
27 | var _xfilter =
|
28 |
|
29 | _curry2(function _xfilter(f, xf) {
|
30 | return new XFilter(f, xf);
|
31 | });
|
32 |
|
33 | module.exports = _xfilter; |
\ | No newline at end of file |