
On Fri, 9 Sep 2011, Gordon Woodhull wrote: (snip)
I am looking at porting various Boost.Graph algorithms to my proposed MPL.Graph. Do I understand that monads will help me define metadata structures like heaps and forests that don't seem to "map" easily to functional programming?
Slightly off-topic, but related: another approach to that problem is to use purely functional data structures. There is a book on the topic (http://www.amazon.com/Purely-Functional-Structures-Chris-Okasaki/dp/05216635...), as well as a thesis available online (http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf). There is a Haskell library, Edison (http://www.haskell.org/ghc/docs/edison/), implementing them, and there is a Functional Graph Library (http://web.engr.oregonstate.edu/~erwig/fgl/) as well. Those might be useful to avoid monads for some of the graph algorithms you want to implement. -- Jeremiah Willcock