Types and Functions 6: Applicative

Both Http calls will happen instantly and renderPage will be called when both are resolved.

No idea why this is the case that ap makes the calls happen instantly and it is not explained. A paragraph later it is explained, the initial function is curried and is waiting for both of its parameters to arrive before it can run. What ap does is immediately execute whatever needs to be done to get such a parameter.

liftA2(add, Maybe.of(2), Maybe.of(3));

That is rather incredible.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.