On Mon, Oct 15, 2012 at 11:33 AM, Jake McArthur <jake.mcart...@gmail.com> wrote: > 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).
My previous answer didn't do the Kleisli style much justice. It could look a bit nicer with more Arrow-style combinators: f &=& g = runKleisli $ Kleisli f &&& Kleisli g print <=< const getLine &=& const getLine $ () _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe