source: node_modules/ramda/es/internal/_xdrop.js

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