Proposal: Adding Kleisli composition to Control.Monad
Malcolm.Wallace at cs.york.ac.uk
Mon Nov 13 09:27:09 EST 2006
Henning Thielemann <lemming at henning-thielemann.de> wrote:
> > > > Add Kleisli composition to Control.Monad.
> > > >
> > > > (>=>) :: (Monad m) => (a -> m b) -> (b -> m c) -> (a -> m c)
> > > > (<=<) :: (Monad m) => (b -> m c) -> (a -> m b) -> (a -> m c)
> > >
> > > Does anyone have an opinion about these guys? :)
> > No. :-) I've never used them, nor wanted to, so I have no opinion.
> > I can see the nice compositional pattern they embody though.
> Strange, the first time, I used them, was processing HTML data parsed
> by HaXML. :-)
Oops, egg-on-face time. I had forgotten about that. Yes, the HaXml
combinators use Kleisli composition extensively (although it is called
`o` there. And I only recognised that ContentFilter is a monad *very*
More information about the Libraries