[Haskell-beginners] ap = liftM2 id

martin martin.drautzburg at web.de
Thu Mar 26 20:18:37 UTC 2015


Hello all,

can someone explain

ap  =  liftM2 id

to me? liftM2 wants a binary funcation

liftM2  :: (Monad m) => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r

but id is unary. How does this work?


More information about the Beginners mailing list