UNPKG

moltres-utils

Version:
35 lines (26 loc) 785 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _curry = _interopRequireDefault(require("./curry")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class XMap { constructor(func, xfunc) { this.xf = xfunc; this.f = func; } ['@@transducer/init']() { return this.xf['@@transducer/init'](); } ['@@transducer/result'](result) { return this.xf['@@transducer/result'](result); } ['@@transducer/step'](result, input) { return this.xf['@@transducer/step'](result, this.f(input)); } } const xmap = (0, _curry.default)((func, xfunc) => new XMap(func, xfunc)); var _default = xmap; exports.default = _default; //# sourceMappingURL=xmap.js.map