protected void visit(V n, Deque<V> temp) throws SorterException {
		if (temp.contains(n)) {
			throw new SorterException("Graph is cyclic", temp);
		}
		if (unmarked.contains(n)) {
			temp.push(n);
			try {
				for (V m : graph.getSuccessors(n)) {
					visit(m, temp);
				}
				unmarked.remove(n);
			}
			finally {
				temp.pop();
			}
			list.push(n);
		}
	}
Visit a vertex, checking for a cycle

@param n the vertex
@param temp a list of previously-visited vertices on this path
@throws SorterException if a cycle is detected
Ghidra/Debug/ProposedUtils/src/main/java/ghidra/graph/algo/TopologicalSorter.java