Andrew Coppin wrote:
(As an aside, Control.Monad.ap is not a function I've ever heard of. It seems simple enough, but what an unfortunate name...!)
I think it makes sense. It stands for "apply," or at least that is what I think of when I see it. If we have a function f :: A -> B -> C -> D and values a :: m A, b :: m B, c :: m C, then we can do:

   f `liftM` a `ap` b `ap` c

... which is the same as (using Applicative):

   f <$> a <*> b <*> c

... both having type m D.

- Jake
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to