source: node_modules/ramda/src/internal/_xmap.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 545 bytes
Line 
1var _xfBase =
2/*#__PURE__*/
3require("./_xfBase.js");
4
5var XMap =
6/*#__PURE__*/
7function () {
8 function XMap(f, xf) {
9 this.xf = xf;
10 this.f = f;
11 }
12
13 XMap.prototype['@@transducer/init'] = _xfBase.init;
14 XMap.prototype['@@transducer/result'] = _xfBase.result;
15
16 XMap.prototype['@@transducer/step'] = function (result, input) {
17 return this.xf['@@transducer/step'](result, this.f(input));
18 };
19
20 return XMap;
21}();
22
23var _xmap = function _xmap(f) {
24 return function (xf) {
25 return new XMap(f, xf);
26 };
27};
28
29module.exports = _xmap;
Note: See TracBrowser for help on using the repository browser.