
15 Oct
2012
15 Oct
'12
11:39 a.m.
On Mon, Oct 15, 2012 at 11:33 AM, Jake McArthur
On Mon, Oct 15, 2012 at 7:59 AM, Ertugrul Söylemez
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 $ ()