Applicative functor

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. Applicative functors are the programming equivalent of strong lax monoidal functors 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.[1]

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.[2]

See also

References

  1. Mcbride, Conor; Paterson, Ross (2008-01-01). "Applicative programming with effects". Journal of Functional Programming. 18 (01): 1–13. doi:10.1017/S0956796807006326. ISSN 1469-7653.
  2. "Functor-Applicative-Monad Proposal - HaskellWiki". wiki.haskell.org. Retrieved 2016-04-06.


This article is issued from Wikipedia - version of the 10/22/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.