Attempting to port the examples in http://www.aosabook.org/en/500L/dagoba-an-in-memory-graph-database.html to Haskell
NOTE: This has been moved to a repo proper.
-
If I were better at Lens, it would probably make this much shorter. Alas.
-
The "Graph", once I was done implementing all the way to Example, only needed to be a map of
{ Id: Vertex a }
(wherea
is whatever data you care about). So I ripped out the Arrays and simplified the pointers from the JavaScript version. A lack of mutability actually forced me to this (IMO better) direction, FWIW.