Wrote functions for reasoning about directed graphs in Algorithmic
Thinking.