uni-graphs-2.2.1.1: Graphs

Safe HaskellSafe
LanguageHaskell98

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.