[Haskell-beginners] Functors and Applicatives; I'm just not getting it ...

Francesco Ariis fa-ml at ariis.it
Sun Oct 19 14:48:58 UTC 2014


On Sun, Oct 19, 2014 at 09:51:33AM -0400, Frank wrote:
> Thanks but I think this misses the point a bit. A some point in time, I
> will need an explanation about applicatives and teg supposedly best
> documentation (or at least the documentation I see advocated in numerous
> places) seems really bad at providing that explanation, a point I find
> worrisome. I know myself well enough to say becoming comfortable with
> functors will not make understanding applicatives any easier if the
> applicatives explanation is not clear and, right now, the explanation is
> not clear.

Applicatives are Functors, so a solid understanding of the latter is required
to grasp the former.

    - Did you go through all the examples from Learn You a Haskell [1]?

    - Could you write the `instance Functor Tree` if asked?

    - There are instances like `Functor ((->) r)` and `Functor ((,) a)`;
      how do they behave? Could you rewrite them *not* to follow Functor laws?

Once you feel comfortable with the more mind bending cases of Functor,
Applicative will be way easier to understand.


[1] http://learnyouahaskell.com/making-our-own-types-and-typeclasses#the-functor-typeclass


More information about the Beginners mailing list