{"ScriptPreparationCode":"function rest(...args) {\r\n return function(fn) {\r\n return args.map(fn);\r\n };\r\n}\r\n\r\nfunction argsToArray() {\r\n const len = arguments.length;\r\n const args = Array(len);\r\n for (let i = 0; i \u003C len; i\u002B\u002B) {\r\n args[i] = arguments[i];\r\n }\r\n return function(fn) {\r\n return args.map(fn);\r\n };\r\n}","TestCases":[{"Name":"rest with 10 args","Code":"rest(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)(n =\u003E 2 * n);","IsDeferred":false},{"Name":"rest with 1 arg","Code":"rest(1)(n =\u003E 2 * n);","IsDeferred":false},{"Name":"argsToArray with 10 args","Code":"argsToArray(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)(n =\u003E 2 * n);","IsDeferred":false},{"Name":"argsToArray with 1 arg","Code":"argsToArray(1)(n =\u003E 2 * n);","IsDeferred":false}]}