UNPKG

pnpm

Version:

Fast, disk space efficient package manager

25 lines (19 loc) 721 B
var _curry2 = /*#__PURE__*/require('./_curry2'); var _reduced = /*#__PURE__*/require('./_reduced'); var _xfBase = /*#__PURE__*/require('./_xfBase'); var XTakeWhile = /*#__PURE__*/function () { function XTakeWhile(f, xf) { this.xf = xf; this.f = f; } XTakeWhile.prototype['@@transducer/init'] = _xfBase.init; XTakeWhile.prototype['@@transducer/result'] = _xfBase.result; XTakeWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result); }; return XTakeWhile; }(); var _xtakeWhile = /*#__PURE__*/_curry2(function _xtakeWhile(f, xf) { return new XTakeWhile(f, xf); }); module.exports = _xtakeWhile;