// ControllableIterateAdjacencyNodes for/range on all adjacency nodes of current node,
// call IterateAction for each iterated node.
// break the loop immdiately if action return `BreakIterate`
ControllableIterateAdjacencyNodes for/range on all adjacency nodes of current node,
call IterateAction for each iterated node.
break the loop immdiately if action return `BreakIterate`
// ControllableIterateAdjacencyNodes for / range on all adjacency nodes of current node // call IterateAction for each iterated node . // break the loop immdiately if action return ` BreakIterate `
func (g adjacencyListGraph) ControllableIterateAdjacencyNodes(currNode NodeID, action IterateActionWithControl) {
	if !g.IsNodeValid(currNode) {
		return
	}
	for _, v := range g.adjList[currNode] {
		condition := action(v)
		if condition == BreakIterate {
			break
		}
	}
}
func ( g adjacencyListGraph ) ControllableIterateAdjacencyNodes ( currNode NodeID , action IterateActionWithControl ) { if ! g . IsNodeValid ( currNode ) { return } for _ , v := range g . adjList [ currNode ] { condition := action ( v ) if condition == BreakIterate { break } } }
ControllableIterateAdjacencyNodes for/range on all adjacency nodes of current node,
call IterateAction for each iterated node.
ControllableIterateAdjacencyNodes for / range on all adjacency nodes of current node call IterateAction for each iterated node .