Applicative Functors for multiple arguments

Share this video with your friends

Send Tweet

Working our way backwards from solution to problem, we define an applicative functor, then use it to apply a function of multiple arguments.

LiveChat
LiveChat
~ 8 years ago

I've found slightly different signature of lift over the internet here.

The most 'confusing' part is not a signature of lift itself as its only matter of currying here, but the more interesting question comes when looking at the signature of lifted function. Yours comes uncurried and the other one is curried.

I'm struggling with the concept itself and would like to debug this to the atoms (and gonna do this with both approaches), just wondering about your opinion on the matter. I guess the form of those is not really that much relevant as its the idea which matters.

OTOH I see the whole functional programming as the universal contract on the ideas between languages and in that case it matters which one is more 'correct'.

Brian Lonsdorf
Brian Lonsdorf(instructor)
~ 8 years ago

Good observation for sure. I think currying should be done all or nothing. It's confusing to me without type signatures if some functions are curried and others aren't. Ramda subscribes wholesale which is intuitive. I think we should go all one or the other in a single codebase

Robert Pearce
Robert Pearce
~ 6 years ago

...and now I understand liftA2. Thanks for the great walk-through