Applicative Functor


#1

Originally published at: https://purelyfunctional.tv/category-theory/applicative-functor/
Time: 18m14s

Applicative functor is the topic of this video. It is a type of Functor that is extended to let you apply a functor of functions to a functor of its arguments.


#2

I don’t really get the last example.
You’re checking if the length of each arguments it 0, instead of checking if null was passed. This check is not really required, because if you do get an empty array in one of the arguments, returning an empty array is handled by .forEach, which will just not do anything either in the inner or outer loop.
In the same time, if null is passed as one of the arguments, your guards will just error, and nothing will be returned.

Thanks


#3

Hi @labria,

Yeah, it sounds like my code could be better!

Eric