UNPKG

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