[Haskell-cafe] Confusion on the third monad law when using lambda abstractions

Jake McArthur jake.mcarthur at gmail.com
Wed Jun 17 22:26:14 EDT 2009


Jon Strait wrote:
> I'm reading the third (bind associativity) law for monads in this form:
> 
> m >>= (\x -> k x >>= h)  =  (m >>= k) >>= h

Arguably, that law would be better stated as:

     (h <=< k) <=< m  =  h <=< (k <=< m)

This wouldn't be so unintuitive.

- Jake


More information about the Haskell-Cafe mailing list