simplicity of Dijkstra's algorithm in groovy