
damodar kulkarni
The Monad class makes us define bind (>>=) and unit (return) for our monads.
Why the Kleisli composition (>=>) or (<=<) is not made a part of Monad class instead of bind (>>=)?
Is there any historical reason behind this?
The bind (>>=) is not as elegant as (>=>), at least as I find it.
Am I missing something?
Try to express do x <- getLine y <- getLine print (x, y) using only Kleisli composition (without cheating). Through cheating (doing non-categorical stuff) it's possible to implement (>>=) in terms of (<=<), but as said that's basically breaking the abstraction. Greets, Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad.