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
|
Rev | Line | |
---|
[d24f17c] | 1 | var _xfBase =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | require("./_xfBase.js");
|
---|
| 4 |
|
---|
| 5 | var XMap =
|
---|
| 6 | /*#__PURE__*/
|
---|
| 7 | function () {
|
---|
| 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 |
|
---|
| 23 | var _xmap = function _xmap(f) {
|
---|
| 24 | return function (xf) {
|
---|
| 25 | return new XMap(f, xf);
|
---|
| 26 | };
|
---|
| 27 | };
|
---|
| 28 |
|
---|
| 29 | module.exports = _xmap; |
---|
Note:
See
TracBrowser
for help on using the repository browser.