Basically, I know how to create graph data structures and use Dijkstra\'s algorithm in programming languages where side effects are allowed. Typically, graph algorithms use
Here is a Swift example. You might find this a bit more readable. The variables are actually descriptively named, unlike the super cryptic Haskell examples.