Applicative functor

Applicative functors allow for functorial computations to be sequenced (unlike plain functors), but don't allow using results from prior computations in the definition of subsequent ones (unlike monads).

[1] Applicative functors first appeared as a library feature in Haskell, but have since spread to other languages as well, including Idris, Agda, OCaml, Scala and F#.

Glasgow Haskell, Idris, and F# offer language features designed to ease programming with applicative functors.

These two functions may be defined in terms of each other; therefore only one is needed for a minimally complete definition.

In Haskell, the Maybe type can be made an instance of the type class Applicative using the following definition:[2] As stated in the Definition section, pure turns an a into a Maybe a, and <*> applies a Maybe function to a Maybe value.