Functor is any data type that defines how fmap applies to it.Applicative pushes Functor aside.Control.Applicative defines <*>>>= (pronounced "bind") to do this.Monad is another typeclass.Maybe is a Functor, an Applicative, and a Monaddo notationFunctor, Applicative, Monad are typeclass, the value implements them is one Functor or Applicative or MonadFunctor typeclass.Applicative typeclass.Monad typeclass.Maybe implements all three, so it is a functor, an applicative, and a monad.fmap or <$><*> or liftA>>= or liftM# normal
f a -> b
# functor:
f <a> -> <b>
# applicative:
<f> <a> -> <b>
# monad: f a ->
<a> (f a -> <b>) -> <b>
所以
另外一种视角
Functor: apply a function to a container.Applicative: apply a multi-argument function to multiple containers.Monad: like Applicative but I can decide what to do next after each step.所以可以把这个 container 看作“更多数量的元素”,把monad看做可中断的流水线。