uni-graphs-2.2.1.1: Graphs
Graphs.FindCycle
Description
The function in this module finds a cycle in a given directed graph, if one exists.
findCycle :: Ord a => [a] -> (a -> [a]) -> Maybe [a] Source #
Find a cycle in a graph. We are given a list of nodes to start from, and a successor function.