Replace reversed() with apply { reverse() } or asReversed()

This commit is contained in:
Ilya Gorbunov
2015-11-14 05:32:27 +03:00
parent 32151c077e
commit 21e2e68ed4
6 changed files with 10 additions and 10 deletions
@@ -45,7 +45,7 @@ public fun topologicalSort<T>(items: Iterable<T>, dependencies: (T) -> Iterable<
for (item in items)
DfsVisit(item)
return result.reversed()
return result.apply { reverse() }
}
public class CycleInTopoSortException : Exception()