uni-graphs-2.2.1.2: Graphs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphs.FindCycle

Description

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

Synopsis

Documentation

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.