Created
October 23, 2013 10:24
-
-
Save PavelPenkov/7116146 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val edges = for(i <- 0 until n; tail <- adj(i)) yield (i, tail) | |
| val reversed = edges.foldLeft(Digraph(n))(_.addEdge(_)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment