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