{"ScriptPreparationCode":"var lol = {\r\n getById: () =\u003E []\r\n}","TestCases":[{"Name":" simple function","Code":"var artifacts = {\r\n getById: () =\u003E []\r\n}\r\n\r\nconst flatten = (artifacts, artifactId) =\u003E {\r\n const foo = (artifactId) =\u003E{\r\n return lol.getById(artifactId);\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}\r\n\r\n","IsDeferred":false},{"Name":"higher order function","Code":"var artifacts = {\r\n getById: () =\u003E []\r\n}\r\n\r\nconst createFlattenr = (artifacts) =\u003E {\r\n const getDependencies = (artifactId) =\u003E lol.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}\r\n","IsDeferred":false}]}