theres a rich body of graph algorithsm eg topological sort... if you think it makes sense ill implement and submit a pr :)