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