{"ScriptPreparationCode":"var sqr = x =\u003E x * x\r\nvar isEven = x =\u003E x \u003E 0 \u0026\u0026 0 === x % 2\r\nvar sum = (x, y) =\u003E x \u002B y\r\nvar toString = x =\u003E \u0027\u0027 \u002B x\r\nvar len = x =\u003E x.length\r\n\r\nvar limit = 1e6\r\nvar arr = new Array(limit).fill().map((_, i) =\u003E i \u002B 1)\r\n\r\n\r\n","TestCases":[{"Name":"Ramda","Code":"var ramdaResult = R.pipe(\r\n R.filter(isEven),\r\n R.map(sqr),\r\n R.map(toString),\r\n R.map(len),\r\n R.reduce(sum, 0)\r\n)(arr)\r\n","IsDeferred":false},{"Name":"Lodash","Code":"var lodashResul = _.chain(arr)\r\n .filter(isEven)\r\n .map(sqr)\r\n .map(toString)\r\n .map(len)\r\n .reduce(sum, 0)\r\n .value()\r\n\r\n","IsDeferred":false},{"Name":"Native","Code":"var result = arr\r\n .filter(isEven)\r\n .map(sqr)\r\n .map(toString)\r\n .map(len)\r\n .reduce(sum, 0)\r\n\r\n","IsDeferred":false},{"Name":"for Loop","Code":"let loopResult = 0\r\nfor (let i = 1; i \u003C= limit; i\u002B\u002B) {\r\n if (isEven(i)) {\r\n loopResult \u002B= (\u0027\u0027 \u002B sqr(i)).length\r\n }\r\n}\r\n\r\n","IsDeferred":false},{"Name":"transdusers","Code":"const xForm = R.compose(\r\n R.filter(isEven),\r\n R.map(sqr),\r\n R.map(toString),\r\n R.map(len)\r\n)\r\nconst transduserResul = R.transduce(xForm, sum, 0, arr)\r\n","IsDeferred":false}]}