↓ Skip to main content

Types and Functions 6: Applicative

·82 words

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.

Alper Cugun
Author
Alper Cugun

Related

Types and Function 5: Monads

·303 words
I’m looking forward to this chapter. When they taught us Haskell as an undergrad they made sure to stop well short of Monads. At the time I was happy about that but by now I wish we had pushed on.

·27 words
A concretized framework for making better product decisions by Laura Klein that comes down to: get together, write things down, review things, course correct when required.