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:
655 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | var _xfBase =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./_xfBase.js");
|
---|
| 4 |
|
---|
| 5 | var _promap =
|
---|
| 6 | /*#__PURE__*/
|
---|
| 7 | require("./_promap.js");
|
---|
| 8 |
|
---|
| 9 | var XPromap =
|
---|
| 10 | /*#__PURE__*/
|
---|
| 11 | function () {
|
---|
| 12 | function XPromap(f, g, xf) {
|
---|
| 13 | this.xf = xf;
|
---|
| 14 | this.f = f;
|
---|
| 15 | this.g = g;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | XPromap.prototype['@@transducer/init'] = _xfBase.init;
|
---|
| 19 | XPromap.prototype['@@transducer/result'] = _xfBase.result;
|
---|
| 20 |
|
---|
| 21 | XPromap.prototype['@@transducer/step'] = function (result, input) {
|
---|
| 22 | return this.xf['@@transducer/step'](result, _promap(this.f, this.g, input));
|
---|
| 23 | };
|
---|
| 24 |
|
---|
| 25 | return XPromap;
|
---|
| 26 | }();
|
---|
| 27 |
|
---|
| 28 | function _xpromap(f, g) {
|
---|
| 29 | return function (xf) {
|
---|
| 30 | return new XPromap(f, g, xf);
|
---|
| 31 | };
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | module.exports = _xpromap; |
---|
Note:
See
TracBrowser
for help on using the repository browser.