Re: [Haskell-cafe] tree with labeled edges as a monad

2005-01-19 Thread Iavor Diatchki
Hi, This is a "hey that's cool" post :-) I have seen both of those separately --- the generalized resumptions monad, and the IO (and others) monad written in continuation passing style, but never realized that the one was an instance of the other. It is neat how the basic operations are separated f

Re: [Haskell-cafe] tree with labeled edges as a monad

2005-01-19 Thread Ross Paterson
On Wed, Jan 19, 2005 at 01:40:06AM -0800, Andrew Pimlott wrote: > This is a "have you seen this monad?" post. I was trying to construct a > search tree, and decided I wanted to do it in a monad (so I could apply > StateT and keep state as I explored the space). I discovered that a > tree with lab

[Haskell-cafe] tree with labeled edges as a monad

2005-01-19 Thread Andrew Pimlott
This is a "have you seen this monad?" post. I was trying to construct a search tree, and decided I wanted to do it in a monad (so I could apply StateT and keep state as I explored the space). I discovered that a tree with labeled leaves is a monad, but I wanted to label internal nodes, and such a