moltres-utils
Version:
Utils for Moltres apps
31 lines (23 loc) • 492 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
class XWrap {
constructor(fn) {
this.f = fn;
}
['@@transducer/init']() {
throw new Error('init not implemented on XWrap');
}
['@@transducer/result'](acc) {
return acc;
}
['@@transducer/step'](acc, x) {
return this.f(acc, x);
}
}
const xwrap = fn => new XWrap(fn);
var _default = xwrap;
exports.default = _default;
//# sourceMappingURL=xwrap.js.map
;