> I think the point that was being made is that:
>
> liftM2 (flip f) /= flip (liftM2 f)
>
> This is because the former (well: liftM2 (flip f) a b)  effectively does:
>
> do {x <- a; y <- b; return (f y x)}
>
> Whereas the latter (flip (liftM2 f) a b) effectively does:
>
> do {y <- b; x <- a; return (f y x)}
>
> That is, the order of the arguments to liftM2 matters because they are
> executed in that order.  So lifting the flipped function has a different
> effect to flipping the lifted function.
>
> Thanks,
>
> Neil.

Thanks, I can see how that could lead to confusion.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to