How do I implement graphs and graph algorithms in a functional programming language?

前端 未结 6 1309
暖寄归人
暖寄归人 2020-12-23 02:47

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

6条回答
  •  北海茫月
    2020-12-23 03:00

    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.

    https://github.com/gistya/Functional-Swift-Graph

提交回复
热议问题