Applicative Functors
Learn how to use applicatives with the help of the examples in this lesson.
We'll cover the following...
We'll cover the following...
Applicative functors
An applicative functor wraps a function. It can apply its function to another functor. For example:
The first thing to know is that this code only works because Just isn’t only a functor, it is also an applicative functor. An ordinary functor doesn’t have an apply method. So, having wrapped our neg function in the applicative functor, f, we can apply it ...