
13 Nov
2006
13 Nov
'06
9:27 a.m.
Henning Thielemann
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* recently.) Regards, Malcolm