Why is >>= more often talked about than <=<?

Viewed 266

Let's say we have g :: a -> b, and f :: b -> c. We can write:

  1. f . g :: a -> c.

If our functions return monadic values (i.e. values in contexts), for example, g1 :: (Monad m) => a -> m b and f1 :: (Monad m) => b -> m c. We can write:

  1. f1 <=< g1 :: (Monad m) => a -> m c.
  2. return x >>= g1 >>= f1, where x :: a, to get a value back. Or even the lambda \x -> return x >>= g1 >>= f1.

It seems that <=< is more parallel to . in terms of syntax. <=< makes it easier to understand Monad is just about function composition that preserves context. Why is >>= more often talked about than <=<?

2 Answers
Related