From 5a83950274dcea5ccc0ec1d5c8e8fe2b45d9c485 Mon Sep 17 00:00:00 2001 From: oatkiller Date: Mon, 29 Jun 2020 14:51:23 -0400 Subject: [PATCH] remove dead code --- .../public/resolver/lib/tree_sequencers.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/x-pack/plugins/security_solution/public/resolver/lib/tree_sequencers.ts b/x-pack/plugins/security_solution/public/resolver/lib/tree_sequencers.ts index 219c58d6efc9c5..843126c0eef5a6 100644 --- a/x-pack/plugins/security_solution/public/resolver/lib/tree_sequencers.ts +++ b/x-pack/plugins/security_solution/public/resolver/lib/tree_sequencers.ts @@ -4,20 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -/** - * Sequences a tree, yielding children returned by the `children` function. Sequencing is done in 'depth first preorder' fashion. See https://en.wikipedia.org/wiki/Tree_traversal#Pre-order_(NLR) - */ -export function* depthFirstPreorder(root: T, children: (parent: T) => T[]): Iterable { - const nodesToVisit = [root]; - while (nodesToVisit.length !== 0) { - const currentNode = nodesToVisit.shift(); - if (currentNode !== undefined) { - nodesToVisit.unshift(...(children(currentNode) || [])); - yield currentNode; - } - } -} - /** * Sequences a tree, yielding children returned by the `children` function. Sequencing is done in 'level order' fashion. */