main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
650 bytes
|
Line | |
---|
1 | import _xfBase from "./_xfBase.js";
|
---|
2 |
|
---|
3 | var XDropWhile =
|
---|
4 | /*#__PURE__*/
|
---|
5 | function () {
|
---|
6 | function XDropWhile(f, xf) {
|
---|
7 | this.xf = xf;
|
---|
8 | this.f = f;
|
---|
9 | }
|
---|
10 |
|
---|
11 | XDropWhile.prototype['@@transducer/init'] = _xfBase.init;
|
---|
12 | XDropWhile.prototype['@@transducer/result'] = _xfBase.result;
|
---|
13 |
|
---|
14 | XDropWhile.prototype['@@transducer/step'] = function (result, input) {
|
---|
15 | if (this.f) {
|
---|
16 | if (this.f(input)) {
|
---|
17 | return result;
|
---|
18 | }
|
---|
19 |
|
---|
20 | this.f = null;
|
---|
21 | }
|
---|
22 |
|
---|
23 | return this.xf['@@transducer/step'](result, input);
|
---|
24 | };
|
---|
25 |
|
---|
26 | return XDropWhile;
|
---|
27 | }();
|
---|
28 |
|
---|
29 | export default function _xdropWhile(f) {
|
---|
30 | return function (xf) {
|
---|
31 | return new XDropWhile(f, xf);
|
---|
32 | };
|
---|
33 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.