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