Affiliation:
1. Newcastle University, UK
2. Facebook, UK
3. Jane Street, UK
Abstract
Applicative functors and monads have conquered the world of functional programming by providing general and powerful ways of describing effectful computations using pure functions. Applicative functors provide a way to compose independent effects that cannot depend on values produced by earlier computations, and all of which are declared statically. Monads extend the applicative interface by making it possible to compose dependent effects, where the value computed by one effect determines all subsequent effects, dynamically.
This paper introduces an intermediate abstraction called selective applicative functors that requires all effects to be declared statically, but provides a way to select which of the effects to execute dynamically. We demonstrate applications of the new abstraction on several examples, including two industrial case studies.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference45 articles.
1. Exceptional syntax
2. Chris Birchall and Hamish Dickson. 2019. Implementation of selective applicative functors in Scala. (2019). https://web.archive.org/web/20190623214126/https://github.com/cb372/cats- selective/blob/master/core/src/main/ scala/cats/Selective.scala . Chris Birchall and Hamish Dickson. 2019. Implementation of selective applicative functors in Scala. (2019). https://web.archive.org/web/20190623214126/https://github.com/cb372/cats- selective/blob/master/core/src/main/ scala/cats/Selective.scala .
3. Free Applicative Functors
Cited by
10 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. falsify: Internal Shrinking Reimagined for Haskell;Proceedings of the 16th ACM SIGPLAN International Haskell Symposium;2023-08-30
2. Higher-Order MSL Horn Constraints;Proceedings of the ACM on Programming Languages;2023-01-09
3. Oregano: staging regular expressions with Moore Cayley fusion;Proceedings of the 15th ACM SIGPLAN International Haskell Symposium;2022-09-06
4. Program adverbs and Tlön embeddings;Proceedings of the ACM on Programming Languages;2022-08-29
5. Composing effects into tasks and workflows;Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell;2020-08-09