uni-graphs-2.2.1.0: Graphs

Graphs.FindCycle

Description

The function in this module finds a cycle in a given directed graph, if one exists.

Synopsis

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.