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