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