{"ScriptPreparationCode":" var data = _.range(10000).map(function(i) {\r\n return {\r\n counter: i\r\n }\r\n });\r\n \r\n function isOdd(num) {\r\n return num % 2 === 1;\r\n }\r\n \r\n function square(num) {\r\n return num * num;\r\n }\r\n \r\n function lessThanThreeDigits(num) {\r\n return num.toString().length \u003C 3;\r\n }","TestCases":[{"Name":"Lodash","Code":"var result = _.chain(data)\r\n .map(item =\u003E item.counter)\r\n .filter(isOdd)\r\n .map(square)\r\n .filter(lessThanThreeDigits)\r\n .value();","IsDeferred":false},{"Name":"Ramda without relying on currying or composition","Code":"var result = R.filter(\r\n lessThanThreeDigits,\r\n R.map(\r\n square,\r\n R.filter(\r\n isOdd,\r\n R.pluck(\u0027counter\u0027, data),\r\n ),\r\n ),\r\n);","IsDeferred":false},{"Name":"Ramda with currying and composition","Code":"var result = R.pipe(\r\n R.pluck(\u0027counter\u0027),\r\n R.filter(isOdd),\r\n R.map(square),\r\n R.filter(lessThanThreeDigits)\r\n)(data);","IsDeferred":false},{"Name":"Native","Code":"var result = data\r\n\t.map(x =\u003E x.counter)\r\n\t.filter(isOdd)\r\n\t.map(square)\r\n\t.filter(lessThanThreeDigits)\r\n;","IsDeferred":false},{"Name":"transducer","Code":"const transducer = R.compose(R.map((x) =\u003E x.counter), R.filter(isOdd), R.map(square), R.filter(lessThanThreeDigits));\r\n\r\nconst results = R.into([], transducer, data);","IsDeferred":false},{"Name":"transducer2","Code":"const transducer = R.compose(R.map((x) =\u003E x.counter), R.filter(isOdd), R.map(square), R.filter(lessThanThreeDigits));\r\nconst results = R.transduce(transducer, (xs, x) =\u003E (xs.push(x), xs), [], data); ","IsDeferred":false}]}