
20 Apr
2017
20 Apr
'17
2:52 p.m.
Hi, Today after half a decade I have found `MonadZip` in `base`. The laws state: ``` liftM (f *** g) (mzip ma mb) = mzip (liftM f ma) (liftM g mb) liftM (const ()) ma = liftM (const ()) mb ==> munzip (mzip ma mb) = (ma, mb) ``` The question is why does ``` mzip /= liftM2 (,) ``` in plain words. Notably we can see lack of IO instance which I'm guessing has something to do asynchronous exceptions but I'm probably wrong…. Rather than investigating for next 30 minutes, I thought I'd just sample existing knowledge (that I could not find out from Google). In what circumstances can we not replace `liftM2 (,)` with `mzip`? -- Mateusz K.