Applicative programming with effects
Conor Thomas McBride, Ross Paterson · Journal of Functional Programming · 2007
Abstract In this article, we introduce Applicative functors – an abstract characterisation of an applicative style of effectful programming, weaker than Monads and hence more widespread. Indeed, it is the ubiquity of this programming pattern that drew us to the abstraction. We retrace our steps in this article, introducing the applicative pattern by diverse examples, then abstracting it to define the Applicative type class and introducing a bracket notation that interprets the normal application syntax in the idiom of an Applicative functor. Furthermore, we develop the properties of applicative functors and the generic operations they support. We close by identifying the categorical structure of applicative functors and examining their relationship both with Monads and with Arrow.
Cited by 398 works. doi:10.1017/s0956796807006326 Open-access PDF
Authors
References
- Haskell 98 language and libraries : the revised report
- Toposes, Triples and Theories
- Generalising monads to arrows
- How to replace failure by a list of successes a method for exception handling, backtracking, and pattern matching in lazy functional languages
- Domain specific embedded compilers
- Monadic parsing in Haskell
- Premonoidal categories and notions of computation
- Functional Programming Languages and Computer Architecture
- Garbage Collection, and Memory Efficiency, in Lazy Functional Languages
- FUNCTIONAL PEARL Parsing permutation phrases