diff --git a/README.md b/README.md index 54830e293..4bd89e104 100644 --- a/README.md +++ b/README.md @@ -93,14 +93,14 @@ or the minified version: or from a CDN, either cdnjs: ```html - + ``` or one of the below links from [jsDelivr](http://jsdelivr.com): ```html - - + + ``` diff --git a/bower.json b/bower.json index dd4907d20..4909a5775 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "ramda", "main": "dist/ramda.js", - "version": "0.12.0", + "version": "0.13.0", "homepage": "https://github.com/ramda/ramda", "authors": [ "(Scott Sauyet )", diff --git a/dist/ramda.js b/dist/ramda.js index afd9081a7..643767eb3 100644 --- a/dist/ramda.js +++ b/dist/ramda.js @@ -1,4 +1,4 @@ -// Ramda v0.12.0 +// Ramda v0.13.0 // https://github.com/ramda/ramda // (c) 2013-2015 Scott Sauyet, Michael Hurley, and David Chambers // Ramda may be freely distributed under the MIT license. @@ -343,7 +343,6 @@ * @private * @param {Function} fn The strategy for extracting function names from an object * @return {Function} A function that takes an object and returns an array of function names. - * */ var _functionsWith = function _functionsWith(fn) { return function (obj) { @@ -376,7 +375,6 @@ * @param {*} item the item to find in the Array * @param {Number} from (optional) the index to start searching the Array * @return {Number} The index of the found item, or -1. - * */ var _indexOf = function _indexOf(list, item, from) { var idx = 0, len = list.length; @@ -442,7 +440,6 @@ * @param {*} item the item to find in the Array * @param {Number} from (optional) the index to start searching the Array * @return {Number} The index of the found item, or -1. - * */ var _lastIndexOf = function _lastIndexOf(list, item, from) { var idx = list.length; @@ -895,8 +892,6 @@ * @return {Number|String} The result of `a + b`. * @example * - * var increment = R.add(1); - * increment(10); //=> 11 * R.add(2, 3); //=> 5 * R.add(7)(10); //=> 17 */ @@ -1122,7 +1117,6 @@ }); /** - * * A function wrapping calls to the two functions in an `&&` operation, returning the result of the first * function if it is false-y and the result of the second function otherwise. Note that this is * short-circuited, meaning that the second function will not be invoked if the first returns a false-y @@ -1215,9 +1209,9 @@ * @example * * var fn = R.cond( - * [R.eq(0), R.always('water freezes at 0°C')], - * [R.eq(100), R.always('water boils at 100°C')], - * [R.T, function(temp) { return 'nothing special happens at ' + temp + '°C'; }] + * [R.eq(0), R.always('water freezes at 0°C')], + * [R.eq(100), R.always('water boils at 100°C')], + * [R.T, function(temp) { return 'nothing special happens at ' + temp + '°C'; }] * ); * fn(0); //=> 'water freezes at 0°C' * fn(50); //=> 'nothing special happens at 50°C' @@ -1300,8 +1294,8 @@ * @example * * var matchPhrases = R.compose( - * R.createMapEntry('must'), - * R.map(R.createMapEntry('match_phrase')) + * R.createMapEntry('must'), + * R.map(R.createMapEntry('match_phrase')) * ); * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} */ @@ -1436,7 +1430,6 @@ * var l1 = [{a: 1}, {a: 2}, {a: 3}]; * var l2 = [{a: 3}, {a: 4}]; * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] - * */ var differenceWith = _curry3(function differenceWith(pred, first, second) { var out = []; @@ -1763,11 +1756,11 @@ * @example * * function Rectangle(width, height) { - * this.width = width; - * this.height = height; + * this.width = width; + * this.height = height; * } * Rectangle.prototype.area = function() { - * return this.width * this.height; + * return this.width * this.height; * }; * * var square = new Rectangle(2, 2); @@ -1971,6 +1964,27 @@ return Object(list).length === 0; }); + /** + * Returns `true` if the input value is `NaN`. + * + * Equivalent to ES6's [`Number.isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN). + * + * @func + * @memberOf R + * @category Math + * @sig * -> Boolean + * @param {*} x + * @return {Boolean} + * @example + * + * R.isNaN(NaN); //=> true + * R.isNaN(undefined); //=> false + * R.isNaN({}); //=> false + */ + var isNaN = _curry1(function isNaN(x) { + return typeof x === 'number' && x !== x; + }); + /** * Checks if the input value is `null` or `undefined`. * @@ -2104,20 +2118,20 @@ * @example * * var headLens = R.lens( - * function get(arr) { return arr[0]; }, - * function set(val, arr) { return [val].concat(arr.slice(1)); } + * function get(arr) { return arr[0]; }, + * function set(val, arr) { return [val].concat(arr.slice(1)); } * ); * headLens([10, 20, 30, 40]); //=> 10 * headLens.set('mu', [10, 20, 30, 40]); //=> ['mu', 20, 30, 40] * headLens.map(function(x) { return x + 1; }, [10, 20, 30, 40]); //=> [11, 20, 30, 40] * * var phraseLens = R.lens( - * function get(obj) { return obj.phrase; }, - * function set(val, obj) { - * var out = R.clone(obj); - * out.phrase = val; - * return out; - * } + * function get(obj) { return obj.phrase; }, + * function set(val, obj) { + * var out = R.clone(obj); + * out.phrase = val; + * return out; + * } * ); * var obj1 = { phrase: 'Absolute filth . . . and I LOVED it!'}; * var obj2 = { phrase: "What's all this, then?"}; @@ -2140,7 +2154,6 @@ /** * Returns a lens associated with the provided object. * - * * @func * @memberOf R * @category Object @@ -2159,7 +2172,6 @@ * xoLens(); //=> 1 * xoLens.set(1000); //=> {x: 1000} * xoLens.map(R.add(1)); //=> {x: 2} - * */ var lensOn = _curry3(function lensOn(get, set, obj) { var lns = function () { @@ -2234,7 +2246,7 @@ * * var digits = ['1', '2', '3', '4']; * var append = function(a, b) { - * return [a + b, a + b]; + * return [a + b, a + b]; * } * * R.mapAccum(append, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] @@ -2274,7 +2286,7 @@ * * var digits = ['1', '2', '3', '4']; * var append = function(a, b) { - * return [a + b, a + b]; + * return [a + b, a + b]; * } * * R.mapAccumRight(append, 0, digits); //=> ['04321', ['04321', '0432', '043', '04']] @@ -2405,8 +2417,8 @@ * * var count = 0; * var factorial = R.memoize(function(n) { - * count += 1; - * return R.product(R.range(1, n + 1)); + * count += 1; + * return R.product(R.range(1, n + 1)); * }); * factorial(5); //=> 120 * factorial(5); //=> 120 @@ -3324,11 +3336,11 @@ * var pairs = [[-1, 1], [-2, 2], [-3, 3]]; * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] * var alice = { - * name: 'ALICE', - * age: 101 + * name: 'ALICE', + * age: 101 * }; * var bob = { - * name: 'Bob', + * name: 'Bob', * age: -10 * }; * var clara = { @@ -3756,15 +3768,14 @@ * var greet = function(name) {return 'Hello ' + name;}; * * var shoutedGreet = R.wrap(greet, function(gr, name) { - * return gr(name).toUpperCase(); + * return gr(name).toUpperCase(); * }); * shoutedGreet("Kathy"); //=> "HELLO KATHY" * * var shortenedGreet = R.wrap(greet, function(gr, name) { - * return gr(name.substring(0, 3)); + * return gr(name.substring(0, 3)); * }); * shortenedGreet("Robert"); //=> "Hello Rob" - * */ var wrap = _curry2(function wrap(fn, wrapper) { return curryN(fn.length, function () { @@ -4014,9 +4025,9 @@ * var squareAsyncThenDouble = _composeP(double, squareAsync); * * squareAsyncThenDouble(5) - * .then(function(result) { - * // the result is now 50. - * }); + * .then(function(result) { + * // the result is now 50. + * }); */ var _composeP = function _composeP(f, g) { return function () { @@ -4286,10 +4297,8 @@ * * var lessThan2 = R.flip(R.lt)(2); * var lessThan3 = R.flip(R.lt)(3); - * var xs = R.range(1, 3); - * xs; //=> [1, 2] - * R.all(lessThan2)(xs); //=> false - * R.all(lessThan3)(xs); //=> true + * R.all(lessThan2)([1, 2]); //=> false + * R.all(lessThan3)([1, 2]); //=> true */ var all = _curry2(_dispatchable('all', _xall, _all)); @@ -4312,10 +4321,8 @@ * * var lessThan0 = R.flip(R.lt)(0); * var lessThan2 = R.flip(R.lt)(2); - * var xs = R.range(1, 3); - * xs; //=> [1, 2] - * R.any(lessThan0)(xs); //=> false - * R.any(lessThan2)(xs); //=> true + * R.any(lessThan0)([1, 2]); //=> false + * R.any(lessThan2)([1, 2]); //=> true */ var any = _curry2(_dispatchable('any', _xany, _any)); @@ -4404,7 +4411,6 @@ * var objects = [{}, {}, {}]; * var objectsClone = R.clone(objects); * objects[0] === objectsClone[0]; //=> false - * */ var clone = _curry1(function clone(value) { return _baseCopy(value, [], []); @@ -4468,9 +4474,9 @@ * * //≅ squareAsync(5).then(function(x) { return triple(double(x)) }; * squareAsyncThenDoubleThenTriple(5) - * .then(function(result) { - * // result is 150 - * }); + * .then(function(result) { + * // result is 150 + * }); */ var composeP = _createComposer(_composeP); @@ -5102,20 +5108,20 @@ * @func * @memberOf R * @category Object - * @sig String -> Object -> [*] -> * + * @sig String -> [*] -> Object -> * * @param {String} methodName - * @param {Object} obj * @param {Array} args + * @param {Object} obj * @return {*} * @example * * // toBinary :: Number -> String - * var toBinary = R.invoke('toString', R.__, [2]) + * var toBinary = R.invoke('toString', [2]) * * toBinary(42); //=> '101010' * toBinary(63); //=> '111111' */ - var invoke = curry(function invoke(methodName, obj, args) { + var invoke = curry(function invoke(methodName, args, obj) { return obj[methodName].apply(obj, args); }); @@ -5389,8 +5395,8 @@ * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. * @example * - * R.none(isNaN, [1, 2, 3]); //=> true - * R.none(isNaN, [1, 2, 3, NaN]); //=> false + * R.none(R.isNaN, [1, 2, 3]); //=> true + * R.none(R.isNaN, [1, 2, 3, NaN]); //=> false */ var none = _curry2(_complement(_dispatchable('any', _xany, _any))); @@ -5537,9 +5543,9 @@ * * //≅ squareAsync(5).then(function(x) { return triple(double(x)) }; * squareAsyncThenDoubleThenTriple(5) - * .then(function(result) { - * // result is 150 - * }); + * .then(function(result) { + * // result is 150 + * }); */ var pipeP = function pipeP() { return composeP.apply(this, reverse(arguments)); @@ -6018,16 +6024,15 @@ * var byAge = R.useWith(R.filter, R.propEq('age'), R.identity); * * var kids = [ - * {name: 'Abbie', age: 6}, - * {name: 'Brian', age: 5}, - * {name: 'Chris', age: 6}, - * {name: 'David', age: 4}, - * {name: 'Ellie', age: 5} + * {name: 'Abbie', age: 6}, + * {name: 'Brian', age: 5}, + * {name: 'Chris', age: 6}, + * {name: 'David', age: 4}, + * {name: 'Ellie', age: 5} * ]; * * byAge(5, kids); //=> [{name: 'Brian', age: 5}, {name: 'Ellie', age: 5}] * - * * // Example 2: * * var double = function(y) { return y * 2; }; @@ -6336,7 +6341,6 @@ * return [n, n]; * }; * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] - * */ var chain = _curry2(_checkForMethod('chain', function chain(f, list) { return unnest(_map(f, list)); @@ -6406,7 +6410,6 @@ * * var cs = [[1, 2], [3, 4]]; * R.commuteMap(plus10map, R.of, cs); //=> [[11, 13], [12, 13], [11, 14], [12, 14]] - * */ var commuteMap = _curry3(function commuteMap(fn, of, list) { function consF(acc, ftor) { @@ -6603,7 +6606,6 @@ * }; * R.invert(raceResultsByFirstName); * //=> { 'alice': ['first', 'third'], 'jake':['second'] } - * */ var invert = _curry1(function invert(obj) { var props = keys(obj); @@ -6669,7 +6671,7 @@ * @example * * var madd3 = R.liftN(3, R.curryN(3, function() { - * return R.reduce(R.add, 0, arguments); + * return R.reduce(R.add, 0, arguments); * })); * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] */ @@ -6922,12 +6924,12 @@ * @example * * var madd3 = R.lift(R.curry(function(a, b, c) { - * return a + b + c; + * return a + b + c; * })); * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] * * var madd5 = R.lift(R.curry(function(a, b, c, d, e) { - * return a + b + c + d + e; + * return a + b + c + d + e; * })); * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] */ @@ -7030,6 +7032,7 @@ is: is, isArrayLike: isArrayLike, isEmpty: isEmpty, + isNaN: isNaN, isNil: isNil, isSet: isSet, join: join, diff --git a/dist/ramda.min.js b/dist/ramda.min.js index 058a292e7..c133cfd3c 100644 --- a/dist/ramda.min.js +++ b/dist/ramda.min.js @@ -1,6 +1,6 @@ -// Ramda v0.12.0 +// Ramda v0.13.0 // https://github.com/ramda/ramda // (c) 2013-2015 Scott Sauyet, Michael Hurley, and David Chambers // Ramda may be freely distributed under the MIT license. -(function(){"use strict";var n={ramda:"placeholder"},t=function(n,t){return n+t},r=function(n,t){for(var r=-1;++r0){for(var e,u=0,i=r[u],o=t(i);++ut},b=function(n,t){return Object.prototype.hasOwnProperty.call(t,n)},j=function(n){return n},O=function(n,t,r){var e=0,u=n.length;for("number"==typeof r&&(e=0>r?Math.max(0,u+r):r);u>e;){if(n[e]===t)return e;++e}return-1},_=Array.isArray||function(n){return null!=n&&n.length>=0&&"[object Array]"===Object.prototype.toString.call(n)},I=Number.isInteger||function(n){return n<<0===n},A=function(n){return null!=n&&n===Object(n)&&"function"==typeof n.then},k=function(n){return"function"==typeof n.step&&"function"==typeof n.result},E=function(n,t,r){var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},P=function(n,t){return t>n},C=function(n,t){for(var r=-1,e=t.length,u=[];++rn?t[t.length+n]:t[n]},W=function(n,t){if(null!=t&&0!==n.length){for(var r=t,e=0,u=n.length;u>e&&null!=r;e+=1)r=r[n[e]];return r}},R=function(n,t){return c([n],t)},L=function(n){return n&&n.__transducers_reduced__?n:{value:n,__transducers_reduced__:!0}},N=function(n,t,r){if(n===r)return!0;if(null==r)return!1;t.fn=t.fn||[],t.obj=t.obj||[];for(var e,u,i=-1,o=t.fn.length,f=-1,c=t.obj.length;++i0?(this.n-=1,n):this.xf.step(n,t)},p(function(t,r){return new n(t,r)})}(),D=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){if(this.f){if(this.f(t))return n;this.f=null}return this.xf.step(n,t)},p(function(t,r){return new n(t,r)})}(),F=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){return this.f(t)?this.xf.step(n,t):n},p(function(t,r){return new n(t,r)})}(),U=function(){function n(n,t){this.xf=t,this.f=n,this.found=!1}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.found||(n=this.xf.step(n,void 0)),this.xf.result(n)},n.prototype.step=function(n,t){return this.f(t)&&(this.found=!0,n=L(this.xf.step(n,t))),n},p(function(t,r){return new n(t,r)})}(),X=function(){function n(n,t){this.xf=t,this.f=n,this.idx=-1,this.found=!1}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.found||(n=this.xf.step(n,-1)),this.xf.result(n)},n.prototype.step=function(n,t){return this.idx+=1,this.f(t)&&(this.found=!0,n=L(this.xf.step(n,this.idx))),n},p(function(t,r){return new n(t,r)})}(),$=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(this.xf.step(n,this.last))},n.prototype.step=function(n,t){return this.f(t)&&(this.last=t),n},p(function(t,r){return new n(t,r)})}(),G=function(){function n(n,t){this.xf=t,this.f=n,this.idx=-1,this.lastIdx=-1}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(this.xf.step(n,this.lastIdx))},n.prototype.step=function(n,t){return this.idx+=1,this.f(t)&&(this.lastIdx=this.idx),n},p(function(t,r){return new n(t,r)})}(),H=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){return this.xf.step(n,this.f(t))},p(function(t,r){return new n(t,r)})}(),J=function(){function n(n,t){this.xf=t,this.n=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){return this.n-=1,0===this.n?L(this.xf.step(n,t)):this.xf.step(n,t)},p(function(t,r){return new n(t,r)})}(),K=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){return this.f(t)?this.xf.step(n,t):L(n)},p(function(t,r){return new n(t,r)})}(),Q=function(){function n(n){this.f=n}return n.prototype.init=function(){throw new Error("init not implemented on XWrap")},n.prototype.result=function(n){return n},n.prototype.step=function(n,t){return this.f(n,t)},function(t){return new n(t)}}(),V=p(t),Y=h(function(n){return function(){return n}}),Z=p(function(n,t){return n&&t}),nn=p(function(n,t){for(var r=-1,e=t.length-(n-1),u=new Array(e>=0?e:0);++r=0;)arguments[i]===n&&(u+=1);if(0>=u)return r.apply(this,arguments);var o=T(arguments);return lu(u,function(){for(var t=T(arguments),u=[],i=-1;++i=t}),En=p(b),Pn=p(function(n,t){return n in t}),Cn=h(j),Mn=g(function(n,t,r){return pn(Math.max(n.length,t.length,r.length),function(){return n.apply(this,arguments)?t.apply(this,arguments):r.apply(this,arguments)})}),Sn=V(1),Wn=p(function(n,t){return O(t,n)}),Rn=g(function(n,t,r){return n=n=0?n:r.length,c(c(T(r,0,n),t),T(r,n))}),Ln=p(function(n,t){return null!=t&&t.constructor===n||t instanceof n}),Nn=h(function(n){return _(n)?!0:n?"object"!=typeof n?!1:n instanceof String?!1:1===n.nodeType?!!n.length:0===n.length?!0:n.length>0?n.hasOwnProperty(0)&&n.hasOwnProperty(n.length-1):!1:!1}),Tn=h(function(n){return 0===Object(n).length}),qn=h(function(n){return null==n}),Bn=h(function(n){for(var t=n.length,r=-1;++r=0)return!1;return!0}),zn=h(function(n){var t,r=[];for(t in n)r[r.length]=t;return r}),Dn=p(function(n,t){return E(t,n)}),Fn=h(function(n){return null!=n&&Ln(Number,n.length)?n.length:0/0}),Un=p(function(n,t){var r=function(t){return n(t)};return r.set=p(t),r.map=p(function(r,e){return t(r(n(e)),e)}),r}),Xn=g(function(n,t,r){var e=function(){return n(r)};return e.set=t,e.map=function(e){return t(e(n(r)))},e}),$n=p(P),Gn=p(function(n,t){return t>=n}),Hn=g(function(n,t,r){for(var e=-1,u=r.length,i=[],o=[t];++e=0;)i=n(i[0],r[e]),u[e]=i[1];return[i[0],u]}),Kn=p(function(n,t){for(var r=-1,e=t.length,u=[];++rt?0/0:(n%t+t)%t:0/0}),Vn=p(l(w)),Yn=function(){var n=function(n){return n+"::"+Object.prototype.toString.call(n)},t=function(t){return t.length+":{"+C(n,t).join(",")+"}"};return h(function(n){var r={};return function(){var e=t(arguments);return b(e,r)||(r[e]=n.apply(this,arguments)),r[e]}})}(),Zn=p(l(P)),nt=p(function(n,t){return n%t}),tt=p(M),rt=p(function(n,t){switch(n){case 0:return function(){return t.call(this)};case 1:return function(n){return t.call(this,n)};case 2:return function(n,r){return t.call(this,n,r)};case 3:return function(n,r,e){return t.call(this,n,r,e)};case 4:return function(n,r,e,u){return t.call(this,n,r,e,u)};case 5:return function(n,r,e,u,i){return t.call(this,n,r,e,u,i)};case 6:return function(n,r,e,u,i,o){return t.call(this,n,r,e,u,i,o)};case 7:return function(n,r,e,u,i,o,f){return t.call(this,n,r,e,u,i,o,f)};case 8:return function(n,r,e,u,i,o,f,c){return t.call(this,n,r,e,u,i,o,f,c)};case 9:return function(n,r,e,u,i,o,f,c,a){return t.call(this,n,r,e,u,i,o,f,c,a)};case 10:return function(n,r,e,u,i,o,f,c,a,s){return t.call(this,n,r,e,u,i,o,f,c,a,s)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),et=h(function(n){return-n}),ut=h(function(n){return!n}),it=p(S),ot=h(function(n){return function(){return S(n,arguments)}}),ft=p(function(n,t){return t.charAt(0>n?t.length+n:n)}),ct=p(function(n,t){return t.charCodeAt(0>n?t.length+n:n)}),at=h(function(n){return[n]}),st=p(function(n,t){var r={};for(var e in t)O(n,e)<0&&(r[e]=t[e]);return r}),lt=h(function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments))}}),ht=p(function(n,t){return n||t}),pt=p(W),gt=g(function(n,t,r){return W(n,r)===t}),yt=p(function(n,t){var r={};for(var e in t)O(n,e)>=0&&(r[e]=t[e]);return r}),mt=p(function(n,t){for(var r={},e=-1,u=n.length;++ee;)r[r.length]=e,e+=1;return r}),_t=g(function(n,t,r){for(var e=-1,u=r.length;++e=0;)t=n(t,r[e]);return t}),At=g(function(n,t,r){for(var e=r.length;--e>=0;)t=n(t,r[e],e,r);return t}),kt=p(function(n,t){return v(o(n),t)}),Et=g(function(n,t,r){return c(T(r,0,Math.min(n,r.length)),T(r,Math.min(r.length,n+t)))}),Pt=g(function(n,t,r){return r.replace(n,t)}),Ct=h(function(n){return T(n).reverse()}),Mt=g(function(n,t,r){for(var e=0,u=r.length+1,i=[t];++ee?-1:e>u?1:0})}),Wt=p(function(n,t){return t.indexOf(n)}),Rt=p(function(n,t){return t.lastIndexOf(n)}),Lt=p(function(n,t){return n-t}),Nt=p(function(n,t){return n(t),t}),Tt=p(function(n,t){return i(n).test(t)}),qt=p(function(n,t){for(var r=Number(t),e=new Array(r),u=0;r>u;)e[u]=n(u),u+=1;return e}),Bt=h(function(n){var t=[];for(var r in n)b(r,n)&&(t[t.length]=[r,n[r]]);return t}),zt=h(function(n){var t=[];for(var r in n)t[t.length]=[r,n[r]];return t}),Dt=function(){var n=" \n \f\r   ᠎              \u2028\u2029\ufeff",t="​",r="function"==typeof String.prototype.trim;return h(r&&!n.trim()&&t.trim()?function(n){return n.trim()}:function(t){var r=new RegExp("^["+n+"]["+n+"]*"),e=new RegExp("["+n+"]["+n+"]*$");return t.replace(r,"").replace(e,"")})}(),Ft=h(function(n){return null===n?"Null":void 0===n?"Undefined":Object.prototype.toString.call(n).slice(8,-1)}),Ut=h(function(n){return function(){return n(T(arguments))}}),Xt=h(function(n){return rt(1,n)}),$t=p(function(n,t){for(var r=n(t),e=[];r&&r.length;)e[e.length]=r[0],r=n(r[1]);return e}),Gt=p(function(n,t){for(var r,e=-1,u=t.length,i=[];++e=0},fr=function(n){return function(){for(var t=arguments.length-1,r=arguments[t],e=r.length;--t>=0;)r=n(arguments[t],r);return rn(e,r)}},cr=function(n,t){return h(function(r){for(var e,u=-1,i=t;++u=0;)if(n(t[r]))return t[r]})),qr=p(sr("findLastIndex",G,function(n,t){for(var r=t.length;--r>=0;)if(n(t[r]))return r;return-1})),Br=h(pr(!0)),zr=h(function(n){return Er(function(t,r){var e=T(arguments);return e[0]=r,e[1]=t,n.apply(this,e)})}),Dr=Er(function(n,t){return t[n].apply(t,T(arguments,2))}),Fr=h(x(zn)),Ur=p(sr("groupBy",mr,function(n,t){return yr(function(t,r){var e=n(r);return t[e]=tr(r,t[e]||(t[e]=[])),t},{},t)})),Xr=it(0),$r=g(function(n,t,r){return n=n=0?n:r.length,c(tr(t,T(r,0,n)),T(r,n))}),Gr=g(function(n,t,r){for(var e=[],u=-1;++u=0;)e=t[u],b(e,r)&&!or(e,i)&&(i[i.length]=e);return i})}(),Vr=it(-1),Yr=p(sr("map",H,C)),Zr=p(function(n,t){return yr(function(r,e){return r[e]=n(t[e]),r},{},Qr(t))}),ne=p(function(n,t){return yr(function(r,e){return r[e]=n(t[e],e,t),r},{},Qr(t))}),te=Jr(1,"match"),re=cr(w,-(1/0)),ee=cr(P,1/0),ue=p(o(sr("any",B,e))),ie=Er(ar(c)),oe=Er(ar(zr(c))),fe=p(function(n,t){return yr(function(t,r){var e=t[n(r)?0:1];return e[e.length]=r,t},[[],[]],t)}),ce=function(){return Or.apply(this,Ct(arguments))},ae=function(){return _r.apply(this,Ct(arguments))},se=p(gr),le=g(yr),he=p(function(n,t){return Rr(o(n),t)}),pe=p(function(n,t){return qt(Y(n),t)}),ge=g(ur("slice",function(n,t,r){return Array.prototype.slice.call(r,n,t)})),ye=p(function(n,t){return jr(t).sort(n)}),me=Jr(1,"split"),ve=ge,de=ve(n,1/0),xe=ve(0),we=le(t,0),be=ur("tail",function(n){return T(n,1)}),je=p(sr("take",J,function(n,t){return T(t,0,Math.min(n,t.length))})),Oe=p(sr("takeWhile",K,function(n,t){for(var r=-1,e=t.length;++r=0;)if(r[o]===n)return e[o]===t;for(r[r.length]=n,e[e.length]=t,o=i.length;--o>=0;){var f=i[o];if(!b(f,t)||!yu(t[f],n[f],r,e))return!1}return r.pop(),e.pop(),!0}return!1},Re=function(n,t){for(var r=Qr(t),e=-1,u=r.length;++e1?r.apply(null,T(arguments,1)):rn(re(gr("length",t)),r)}},Ne=Er(Le(r)),Te=Er(Le(e)),qe=p(function(n,t){return hr("ap",n)?n.ap(t):yr(function(n,r){return c(n,Yr(r,t))},[],n)}),Be=Er(function(n){return n.apply(this,T(arguments,1))}),ze=p(ur("chain",function(n,t){return Pe(C(n,t))})),De=Jr(1,"charAt"),Fe=Jr(1,"charCodeAt"),Ue=g(function(n,t,r){function e(t,r){return qe(Yr(xr,n(r)),t)}return yr(e,t([]),r)}),Xe=p(function(n,t){if(n>10)throw new Error("Constructor with greater than ten arguments");return 0===n?function(){return new t}:Er(rt(n,function(n,r,e,u,i,o,f,c,a,s){switch(arguments.length){case 1:return new t(n);case 2:return new t(n,r);case 3:return new t(n,r,e);case 4:return new t(n,r,e,u);case 5:return new t(n,r,e,u,i);case 6:return new t(n,r,e,u,i,o);case 7:return new t(n,r,e,u,i,o,f);case 8:return new t(n,r,e,u,i,o,f,c);case 9:return new t(n,r,e,u,i,o,f,c,a);case 10:return new t(n,r,e,u,i,o,f,c,a,s)}}))}),$e=p(function(n,t){return We(n,t,[],[])}),Ge=p(function(n,t){return Re(Re({},t),ne(function(n,r){return n(t[r])},n))}),He=h(x(Qr)),Je=ge(0,-1),Ke=p(function(n,t){return Ee(m(zr(or)(n),t))}),Qe=h(function(n){for(var t=Qr(n),r=t.length,e=-1,u={};++e0){for(var e,u=0,i=r[u],o=t(i);++ut},b=function(n,t){return Object.prototype.hasOwnProperty.call(t,n)},j=function(n){return n},O=function(n,t,r){var e=0,u=n.length;for("number"==typeof r&&(e=0>r?Math.max(0,u+r):r);u>e;){if(n[e]===t)return e;++e}return-1},_=Array.isArray||function(n){return null!=n&&n.length>=0&&"[object Array]"===Object.prototype.toString.call(n)},I=Number.isInteger||function(n){return n<<0===n},A=function(n){return null!=n&&n===Object(n)&&"function"==typeof n.then},k=function(n){return"function"==typeof n.step&&"function"==typeof n.result},E=function(n,t,r){var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},P=function(n,t){return t>n},C=function(n,t){for(var r=-1,e=t.length,u=[];++rn?t[t.length+n]:t[n]},W=function(n,t){if(null!=t&&0!==n.length){for(var r=t,e=0,u=n.length;u>e&&null!=r;e+=1)r=r[n[e]];return r}},N=function(n,t){return c([n],t)},R=function(n){return n&&n.__transducers_reduced__?n:{value:n,__transducers_reduced__:!0}},L=function(n,t,r){if(n===r)return!0;if(null==r)return!1;t.fn=t.fn||[],t.obj=t.obj||[];for(var e,u,i=-1,o=t.fn.length,f=-1,c=t.obj.length;++i0?(this.n-=1,n):this.xf.step(n,t)},p(function(t,r){return new n(t,r)})}(),D=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){if(this.f){if(this.f(t))return n;this.f=null}return this.xf.step(n,t)},p(function(t,r){return new n(t,r)})}(),F=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){return this.f(t)?this.xf.step(n,t):n},p(function(t,r){return new n(t,r)})}(),U=function(){function n(n,t){this.xf=t,this.f=n,this.found=!1}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.found||(n=this.xf.step(n,void 0)),this.xf.result(n)},n.prototype.step=function(n,t){return this.f(t)&&(this.found=!0,n=R(this.xf.step(n,t))),n},p(function(t,r){return new n(t,r)})}(),X=function(){function n(n,t){this.xf=t,this.f=n,this.idx=-1,this.found=!1}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.found||(n=this.xf.step(n,-1)),this.xf.result(n)},n.prototype.step=function(n,t){return this.idx+=1,this.f(t)&&(this.found=!0,n=R(this.xf.step(n,this.idx))),n},p(function(t,r){return new n(t,r)})}(),$=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(this.xf.step(n,this.last))},n.prototype.step=function(n,t){return this.f(t)&&(this.last=t),n},p(function(t,r){return new n(t,r)})}(),G=function(){function n(n,t){this.xf=t,this.f=n,this.idx=-1,this.lastIdx=-1}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(this.xf.step(n,this.lastIdx))},n.prototype.step=function(n,t){return this.idx+=1,this.f(t)&&(this.lastIdx=this.idx),n},p(function(t,r){return new n(t,r)})}(),H=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){return this.xf.step(n,this.f(t))},p(function(t,r){return new n(t,r)})}(),J=function(){function n(n,t){this.xf=t,this.n=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){return this.n-=1,0===this.n?R(this.xf.step(n,t)):this.xf.step(n,t)},p(function(t,r){return new n(t,r)})}(),K=function(){function n(n,t){this.xf=t,this.f=n}return n.prototype.init=function(){return this.xf.init()},n.prototype.result=function(n){return this.xf.result(n)},n.prototype.step=function(n,t){return this.f(t)?this.xf.step(n,t):R(n)},p(function(t,r){return new n(t,r)})}(),Q=function(){function n(n){this.f=n}return n.prototype.init=function(){throw new Error("init not implemented on XWrap")},n.prototype.result=function(n){return n},n.prototype.step=function(n,t){return this.f(n,t)},function(t){return new n(t)}}(),V=p(t),Y=h(function(n){return function(){return n}}),Z=p(function(n,t){return n&&t}),nn=p(function(n,t){for(var r=-1,e=t.length-(n-1),u=new Array(e>=0?e:0);++r=0;)arguments[i]===n&&(u+=1);if(0>=u)return r.apply(this,arguments);var o=T(arguments);return hu(u,function(){for(var t=T(arguments),u=[],i=-1;++i=t}),En=p(b),Pn=p(function(n,t){return n in t}),Cn=h(j),Mn=g(function(n,t,r){return pn(Math.max(n.length,t.length,r.length),function(){return n.apply(this,arguments)?t.apply(this,arguments):r.apply(this,arguments)})}),Sn=V(1),Wn=p(function(n,t){return O(t,n)}),Nn=g(function(n,t,r){return n=n=0?n:r.length,c(c(T(r,0,n),t),T(r,n))}),Rn=p(function(n,t){return null!=t&&t.constructor===n||t instanceof n}),Ln=h(function(n){return _(n)?!0:n?"object"!=typeof n?!1:n instanceof String?!1:1===n.nodeType?!!n.length:0===n.length?!0:n.length>0?n.hasOwnProperty(0)&&n.hasOwnProperty(n.length-1):!1:!1}),Tn=h(function(n){return 0===Object(n).length}),qn=h(function(n){return"number"==typeof n&&n!==n}),Bn=h(function(n){return null==n}),zn=h(function(n){for(var t=n.length,r=-1;++r=0)return!1;return!0}),Dn=h(function(n){var t,r=[];for(t in n)r[r.length]=t;return r}),Fn=p(function(n,t){return E(t,n)}),Un=h(function(n){return null!=n&&Rn(Number,n.length)?n.length:0/0}),Xn=p(function(n,t){var r=function(t){return n(t)};return r.set=p(t),r.map=p(function(r,e){return t(r(n(e)),e)}),r}),$n=g(function(n,t,r){var e=function(){return n(r)};return e.set=t,e.map=function(e){return t(e(n(r)))},e}),Gn=p(P),Hn=p(function(n,t){return t>=n}),Jn=g(function(n,t,r){for(var e=-1,u=r.length,i=[],o=[t];++e=0;)i=n(i[0],r[e]),u[e]=i[1];return[i[0],u]}),Qn=p(function(n,t){for(var r=-1,e=t.length,u=[];++rt?0/0:(n%t+t)%t:0/0}),Yn=p(l(w)),Zn=function(){var n=function(n){return n+"::"+Object.prototype.toString.call(n)},t=function(t){return t.length+":{"+C(n,t).join(",")+"}"};return h(function(n){var r={};return function(){var e=t(arguments);return b(e,r)||(r[e]=n.apply(this,arguments)),r[e]}})}(),nt=p(l(P)),tt=p(function(n,t){return n%t}),rt=p(M),et=p(function(n,t){switch(n){case 0:return function(){return t.call(this)};case 1:return function(n){return t.call(this,n)};case 2:return function(n,r){return t.call(this,n,r)};case 3:return function(n,r,e){return t.call(this,n,r,e)};case 4:return function(n,r,e,u){return t.call(this,n,r,e,u)};case 5:return function(n,r,e,u,i){return t.call(this,n,r,e,u,i)};case 6:return function(n,r,e,u,i,o){return t.call(this,n,r,e,u,i,o)};case 7:return function(n,r,e,u,i,o,f){return t.call(this,n,r,e,u,i,o,f)};case 8:return function(n,r,e,u,i,o,f,c){return t.call(this,n,r,e,u,i,o,f,c)};case 9:return function(n,r,e,u,i,o,f,c,a){return t.call(this,n,r,e,u,i,o,f,c,a)};case 10:return function(n,r,e,u,i,o,f,c,a,s){return t.call(this,n,r,e,u,i,o,f,c,a,s)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),ut=h(function(n){return-n}),it=h(function(n){return!n}),ot=p(S),ft=h(function(n){return function(){return S(n,arguments)}}),ct=p(function(n,t){return t.charAt(0>n?t.length+n:n)}),at=p(function(n,t){return t.charCodeAt(0>n?t.length+n:n)}),st=h(function(n){return[n]}),lt=p(function(n,t){var r={};for(var e in t)O(n,e)<0&&(r[e]=t[e]);return r}),ht=h(function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments))}}),pt=p(function(n,t){return n||t}),gt=p(W),yt=g(function(n,t,r){return W(n,r)===t}),mt=p(function(n,t){var r={};for(var e in t)O(n,e)>=0&&(r[e]=t[e]);return r}),vt=p(function(n,t){for(var r={},e=-1,u=n.length;++ee;)r[r.length]=e,e+=1;return r}),It=g(function(n,t,r){for(var e=-1,u=r.length;++e=0;)t=n(t,r[e]);return t}),kt=g(function(n,t,r){for(var e=r.length;--e>=0;)t=n(t,r[e],e,r);return t}),Et=p(function(n,t){return v(o(n),t)}),Pt=g(function(n,t,r){return c(T(r,0,Math.min(n,r.length)),T(r,Math.min(r.length,n+t)))}),Ct=g(function(n,t,r){return r.replace(n,t)}),Mt=h(function(n){return T(n).reverse()}),St=g(function(n,t,r){for(var e=0,u=r.length+1,i=[t];++ee?-1:e>u?1:0})}),Nt=p(function(n,t){return t.indexOf(n)}),Rt=p(function(n,t){return t.lastIndexOf(n)}),Lt=p(function(n,t){return n-t}),Tt=p(function(n,t){return n(t),t}),qt=p(function(n,t){return i(n).test(t)}),Bt=p(function(n,t){for(var r=Number(t),e=new Array(r),u=0;r>u;)e[u]=n(u),u+=1;return e}),zt=h(function(n){var t=[];for(var r in n)b(r,n)&&(t[t.length]=[r,n[r]]);return t}),Dt=h(function(n){var t=[];for(var r in n)t[t.length]=[r,n[r]];return t}),Ft=function(){var n=" \n \f\r   ᠎              \u2028\u2029\ufeff",t="​",r="function"==typeof String.prototype.trim;return h(r&&!n.trim()&&t.trim()?function(n){return n.trim()}:function(t){var r=new RegExp("^["+n+"]["+n+"]*"),e=new RegExp("["+n+"]["+n+"]*$");return t.replace(r,"").replace(e,"")})}(),Ut=h(function(n){return null===n?"Null":void 0===n?"Undefined":Object.prototype.toString.call(n).slice(8,-1)}),Xt=h(function(n){return function(){return n(T(arguments))}}),$t=h(function(n){return et(1,n)}),Gt=p(function(n,t){for(var r=n(t),e=[];r&&r.length;)e[e.length]=r[0],r=n(r[1]);return e}),Ht=p(function(n,t){for(var r,e=-1,u=t.length,i=[];++e=0},cr=function(n){return function(){for(var t=arguments.length-1,r=arguments[t],e=r.length;--t>=0;)r=n(arguments[t],r);return rn(e,r)}},ar=function(n,t){return h(function(r){for(var e,u=-1,i=t;++u=0;)if(n(t[r]))return t[r]})),Br=p(lr("findLastIndex",G,function(n,t){for(var r=t.length;--r>=0;)if(n(t[r]))return r;return-1})),zr=h(gr(!0)),Dr=h(function(n){return Pr(function(t,r){var e=T(arguments);return e[0]=r,e[1]=t,n.apply(this,e)})}),Fr=Pr(function(n,t){return t[n].apply(t,T(arguments,2))}),Ur=h(x(Dn)),Xr=p(lr("groupBy",vr,function(n,t){return mr(function(t,r){var e=n(r);return t[e]=rr(r,t[e]||(t[e]=[])),t},{},t)})),$r=ot(0),Gr=g(function(n,t,r){return n=n=0?n:r.length,c(rr(t,T(r,0,n)),T(r,n))}),Hr=g(function(n,t,r){for(var e=[],u=-1;++u=0;)e=t[u],b(e,r)&&!fr(e,i)&&(i[i.length]=e);return i})}(),Yr=ot(-1),Zr=p(lr("map",H,C)),ne=p(function(n,t){return mr(function(r,e){return r[e]=n(t[e]),r},{},Vr(t))}),te=p(function(n,t){return mr(function(r,e){return r[e]=n(t[e],e,t),r},{},Vr(t))}),re=Kr(1,"match"),ee=ar(w,-(1/0)),ue=ar(P,1/0),ie=p(o(lr("any",B,e))),oe=Pr(sr(c)),fe=Pr(sr(Dr(c))),ce=p(function(n,t){return mr(function(t,r){var e=t[n(r)?0:1];return e[e.length]=r,t},[[],[]],t)}),ae=function(){return _r.apply(this,Mt(arguments))},se=function(){return Ir.apply(this,Mt(arguments))},le=p(yr),he=g(mr),pe=p(function(n,t){return Rr(o(n),t)}),ge=p(function(n,t){return Bt(Y(n),t)}),ye=g(ir("slice",function(n,t,r){return Array.prototype.slice.call(r,n,t)})),me=p(function(n,t){return Or(t).sort(n)}),ve=Kr(1,"split"),de=ye,xe=de(n,1/0),we=de(0),be=he(t,0),je=ir("tail",function(n){return T(n,1)}),Oe=p(lr("take",J,function(n,t){return T(t,0,Math.min(n,t.length))})),_e=p(lr("takeWhile",K,function(n,t){for(var r=-1,e=t.length;++r=0;)if(r[o]===n)return e[o]===t;for(r[r.length]=n,e[e.length]=t,o=i.length;--o>=0;){var f=i[o];if(!b(f,t)||!mu(t[f],n[f],r,e))return!1}return r.pop(),e.pop(),!0}return!1},Re=function(n,t){for(var r=Vr(t),e=-1,u=r.length;++e1?r.apply(null,T(arguments,1)):rn(ee(yr("length",t)),r)}},Te=Pr(Le(r)),qe=Pr(Le(e)),Be=p(function(n,t){return pr("ap",n)?n.ap(t):mr(function(n,r){return c(n,Zr(r,t))},[],n)}),ze=Pr(function(n){return n.apply(this,T(arguments,1))}),De=p(ir("chain",function(n,t){return Ce(C(n,t))})),Fe=Kr(1,"charAt"),Ue=Kr(1,"charCodeAt"),Xe=g(function(n,t,r){function e(t,r){return Be(Zr(wr,n(r)),t)}return mr(e,t([]),r)}),$e=p(function(n,t){if(n>10)throw new Error("Constructor with greater than ten arguments");return 0===n?function(){return new t}:Pr(et(n,function(n,r,e,u,i,o,f,c,a,s){switch(arguments.length){case 1:return new t(n);case 2:return new t(n,r);case 3:return new t(n,r,e);case 4:return new t(n,r,e,u);case 5:return new t(n,r,e,u,i);case 6:return new t(n,r,e,u,i,o);case 7:return new t(n,r,e,u,i,o,f);case 8:return new t(n,r,e,u,i,o,f,c);case 9:return new t(n,r,e,u,i,o,f,c,a);case 10:return new t(n,r,e,u,i,o,f,c,a,s)}}))}),Ge=p(function(n,t){return Ne(n,t,[],[])}),He=p(function(n,t){return Re(Re({},t),te(function(n,r){return n(t[r])},n))}),Je=h(x(Vr)),Ke=ye(0,-1),Qe=p(function(n,t){return Pe(m(Dr(fr)(n),t))}),Ve=h(function(n){for(var t=Vr(n),r=t.length,e=-1,u={};++e