(defprotocol DependencyGraphUpdate
(depend [graph node dep]
"Returns a new graph with a dependency from node to dep (\"node depends
on dep\"). Forbids circular dependencies.")
(remove-edge [graph node dep]
"Returns a new graph with the dependency from node to dep removed.")
(remove-all [graph node]
"Returns a new dependency graph with all references to node removed.")
(remove-node [graph node]
"Removes the node from the dependency graph without removing it as a
dependency of other nodes. That is, removes all outgoing edges from
node."))