On Mon, Jul 06, 2009 at 12:54:54PM -0400, Thomas Hartman wrote:
> Can someone give some simple common scenarios where the state monad is
> useful, besides labeling trees?

Implementing the Union-Find data structure[1] for unification based type
inference. As far as I know, no good alternative exists that has the
same very low computational complexity of the true stateful
union-find. Also, it's computational complexity has the ackermann's
function in it, which is just neat.

        John

[1] http://en.wikipedia.org/wiki/Disjoint-set_data_structure

-- 
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to