MCPcopy Create free account
hub / github.com/Effect-TS/effect / collectNodes

Function collectNodes

packages/effect/test/Graph.test.ts:3432–3436  ·  view source on GitHub ↗
(
          nodeIterable: Graph.NodeWalker<N>
        )

Source from the content-addressed store, hash-verified

3430
3431 // Utility function that works with any NodeWalker
3432 function collectNodes<N>(
3433 nodeIterable: Graph.NodeWalker<N>
3434 ): Array<number> {
3435 return Array.from(Graph.indices(nodeIterable)).sort()
3436 }
3437
3438 // Both traversal and element iterators implement NodeWalker
3439 const dfsNodes = Graph.dfs(graph, { start: [0] })

Callers 1

Graph.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected