Apply a function in a Maybe context to Maybe inputs

Share this video with your friends

Send Tweet

Functions are first class in JavaScript. This means we can treat a function like any other data. This also means we can end up with a function as the wrapped value in a Maybe. The Maybe type gives us the ability to apply that wrapped function to other wrapped values, keeping both the value and the function in the safe confines of a Maybe.

Tre' Codez
Tre' Codez
~ 7 years ago

I've been really wanting to grok liftA2 and I think this is the first post on the net I've discovered that made it approachable. Thanks a bunch!

Andy Van Slaars
Andy Van Slaars(instructor)
~ 7 years ago

I've been really wanting to grok liftA2 and I think this is the first post on the net I've discovered that made it approachable. Thanks a bunch!

Glad I managed to make it approachable, it can be tough to wrap your head around this at first... I know it took me a while.