I thought about this (maybe available in Kotlin 1....
# announcements
h
I thought about this (maybe available in Kotlin 1.1):
Copy code
adjacencyList.keys.forEach { source ->
    graph.addVertex(source)
}
adjacencyList.forEach { (source, targets) ->
    targets.forEach { target ->
        graph.addEdge(source, target)
    }
}