Puneet Varma (Editor)

Applicative functor

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In functional programming, specifically Haskell, an applicative functor is a structure that is like a monad (return, fmap, join) without join, or like a functor with return and ap. Applicative functors are the programming equivalent of lax monoidal functors with tensorial strength in category theory. In Haskell, applicative functors are implemented in the Applicative type class. Applicative functors were introduced in 2007 by Conor McBride and Ross Paterson in their paper Functional Pearl: applicative programming with effects.

Relationship to monads

Due to historical accident, applicative functors were not implemented as a subclass of Functor and not as a superclass of Monad, but as a separate type class with no overlap. It turned out that in practice, there was very little demand for such a separation, so in 2014, it was proposed to make Applicative retroactively a subclass of Functor.

References

Applicative functor Wikipedia