[Haskell-cafe] Re: Cannot understand liftM2

2006-12-11 Thread Jón Fairbairn
Nicola Paolucci [EMAIL PROTECTED] writes: Hi All, I'm loving learning Haskell quite a bit. It is stretching my brain but in a delightfull way. I've googled, I've hoogled but I haven't found a clear explanation for what exactly liftM2 does in the context below. Using the cool lambdabot

Re: [Haskell-cafe] Re: Cannot understand liftM2

2006-12-11 Thread Cale Gibbard
On 11 Dec 2006 16:55:17 +, Jón Fairbairn [EMAIL PROTECTED] wrote: Nicola Paolucci [EMAIL PROTECTED] writes: Hi All, I'm loving learning Haskell quite a bit. It is stretching my brain but in a delightfull way. I've googled, I've hoogled but I haven't found a clear explanation for what

[Haskell-cafe] Re: Cannot understand liftM2

2006-12-11 Thread Arie Peterson
I'm loving learning Haskell quite a bit. It is stretching my brain but in a delightfull way. Great! Using the cool lambdabot pointless utility I found out that: \x - snd(x) - fst(x) is the same as: liftM2 (-) snd fst Yes, the '(-) c' monad is very handy. One way to think about it is