@pnpm/ramda
Version:
A practical functional library for JavaScript programmers.
33 lines (26 loc) • 641 B
JavaScript
var _curry2 =
/*#__PURE__*/
require("./_curry2.js");
var _xfBase =
/*#__PURE__*/
require("./_xfBase.js");
var XFilter =
/*#__PURE__*/
function () {
function XFilter(f, xf) {
this.xf = xf;
this.f = f;
}
XFilter.prototype['@@transducer/init'] = _xfBase.init;
XFilter.prototype['@@transducer/result'] = _xfBase.result;
XFilter.prototype['@@transducer/step'] = function (result, input) {
return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;
};
return XFilter;
}();
var _xfilter =
/*#__PURE__*/
_curry2(function _xfilter(f, xf) {
return new XFilter(f, xf);
});
module.exports = _xfilter;