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