Scala Applicative

Let's enhance ourFunctorfrom few episodes ago !

Let's learn aboutApplicativewhich extends what aFunctorcan do.

Now we can build more complex things with the structures we know !

Keep in mind that all the rules fromFunctorare still true.

WithApplicativewe open the possibility to work with several “Boxes”. WithFunctoronly, it wouldn't be possible to combine and compose them together. But withApplicative, we can !

WithFunctoronly, if we haveF[A => B]andF[A], withmapalone, we wouldn't be able to combine them together. But with theapplicatemethod (also simply calledap), we can !

We are getting closer toflattenandflatMap!

Reveal more information and clues
Load Exercise