linear-base-0.5.0: Standard library for linear types.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simple.TopSort

Synopsis

Documentation

type Node = Int Source #

topsort :: [(Node, [Node])] -> [Node] Source #

checkSource :: Node -> InDegGraph %1 -> (InDegGraph, Ur (Maybe Node)) Source #

Check if a node is a source, and if so return it

mapAccum :: (a -> b %1 -> (b, Ur c)) -> [a] -> b %1 -> (b, Ur [c]) Source #