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:
471 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | var XWrap =
|
---|
| 2 | /*#__PURE__*/
|
---|
| 3 | function () {
|
---|
| 4 | function XWrap(fn) {
|
---|
| 5 | this.f = fn;
|
---|
| 6 | }
|
---|
| 7 |
|
---|
| 8 | XWrap.prototype['@@transducer/init'] = function () {
|
---|
| 9 | throw new Error('init not implemented on XWrap');
|
---|
| 10 | };
|
---|
| 11 |
|
---|
| 12 | XWrap.prototype['@@transducer/result'] = function (acc) {
|
---|
| 13 | return acc;
|
---|
| 14 | };
|
---|
| 15 |
|
---|
| 16 | XWrap.prototype['@@transducer/step'] = function (acc, x) {
|
---|
| 17 | return this.f(acc, x);
|
---|
| 18 | };
|
---|
| 19 |
|
---|
| 20 | return XWrap;
|
---|
| 21 | }();
|
---|
| 22 |
|
---|
| 23 | function _xwrap(fn) {
|
---|
| 24 | return new XWrap(fn);
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | module.exports = _xwrap; |
---|
Note:
See
TracBrowser
for help on using the repository browser.