| Safe Haskell | None |
|---|
Data.Graph.GraphVisit
Contents
Description
This module provides a graph visiting abstraction
- graphVisitM :: (Ord node, Monad m) => (thr -> graph -> node -> (thr, Set node)) -> graph -> StateT (GraphVisitState node thr) m ()
- graphVisit :: Ord node => (thr -> graph -> node -> (thr, Set node)) -> Set node -> graph -> thr -> (thr, Set node)
Graph visiting
Arguments
| :: (Ord node, Monad m) | |
| => (thr -> graph -> node -> (thr, Set node)) | fun: visit node, get new thr and nodes to visit next |
| -> graph | graph over which we visit |
| -> StateT (GraphVisitState node thr) m () |
Abstract graph visit, over arbitrary structures, using state holding visited nodes (also acting als start) and an accumulator thr.
All is done in strict StateT.