{"ScriptPreparationCode":"var artifacts = {\r\n getById: () =\u003E [Math.random()]\r\n}\r\n\r\nfunction flatten(artifacts, artifactId) {\r\n const getDependencies1 = (artifactId) =\u003E artifacts.getById(artifactId);\r\n return [\r\n ...getDependencies1(artifactId)\r\n ]\r\n}\r\n\r\nfunction createFlattenr(artifacts){\r\n const getDependencies2 = (artifactId) =\u003E artifacts.getById(artifactId);\r\n return (artifactId) =\u003E {\r\n return [\r\n ...getDependencies2(artifactId)\r\n ]\r\n }\r\n}","TestCases":[{"Name":" simple function","Code":"for(var i = 0; i \u003C 100; i\u002B\u002B) {\r\n flatten(artifacts, i)\r\n}","IsDeferred":false},{"Name":"higher order function","Code":"const f = createFlattenr(artifacts)\r\nfor(var i = 0; i \u003C 100; i\u002B\u002B) {\r\n f(i)\r\n}","IsDeferred":false}]}