1. 11
    Multiply Two Arrays over a Function in JavaScript
    3m 48s

Multiply Two Arrays over a Function in JavaScript

Share this video with your friends

Send Tweet

Just like the State ADT an Array is also an Applicative Functor. That means we can do the same tricks with liftA2 with Array that we have been doing with State. While the Applicative aspect of State allows use to combine multiple stateful transitions over a function, Array allows us to create a new Array that contains the results of calling every permutation of each element in two arrays over a function. We will use this ability to pull from two separate locations in our AppState and generate an Array of Cards.

Zhentian Wan
~ 6 years ago

Awesome!