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 and fmap. 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.[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. ISSN 1469-7653. doi:10.1017/S0956796807006326.
  2. "Functor-Applicative-Monad Proposal - HaskellWiki". wiki.haskell.org. Retrieved 2016-04-06.


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.