finished digraph_functional -> dfs_topologicalsort