How does return >=> f work in Haskell?

Viewed 90

In particular, my question is about how this is considered to be equivalent to f itself?

We know that type of return is:: a -> m a and the type of >=> is:: (a -> m b) -> (b -> m c) -> (a -> m c) So when we apply >=> to return and f, won't there be a type mismatch, because won't we have (a -> m a) -> (b -> m c) as the types of return and f respectively, which means how can we even apply >=> now?

1 Answers
Related