On Mon, Oct 15, 2012 at 7:59 AM, Ertugrul Söylemez <e...@ertes.de> wrote: > Try to express > > do x <- getLine > y <- getLine > print (x, y) > > using only Kleisli composition (without cheating).
In my opinion, this is not as nice as the do-notation version, but at least it's compositional: print <=< (<$> getLine) . (,) <=< const getLine $ () I do think there is value in favoring Kleisli composition for a lot of code. Unfortunately, however, it doesn't tend to work out so nicely for IO. - Jake _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe