
26 Mar
2015
26 Mar
'15
8:34 p.m.
Following up on Andres's explanation, we have ap f x = liftM2 id mf ma -- definition of ap = do { f <- mf; a <- ma; return (id f x) } -- definition of liftM2 = do { f <- mf; a <- ma; return (f x) } -- definition of id, f x y = (f x) y We can see that id applied to f gives f which is then applied to a.