out package:containers

A table of the count of edges from each node.

Examples

outdegree (buildG (0,-1) []) == array (0,-1) []
outdegree (buildG (0,2) [(0,1), (1,2)]) == array (0,2) [(0,1),(1,1),(2,0)]
Remove all the keys in a given set from a map.
m `withoutKeys` s = filterWithKey (\k _ -> k `notMember` s) m
Remove all keys in a Set from a Map.
m `withoutKeys` s = filterWithKey (\k _ -> k `notMember` s) m
m `withoutKeys` s = m `difference` fromSet (const ()) s