Functor and Applicative Functor Usage in TypeScript




Abstract:
Leveraging functional programming concepts to make front-end application development faster and easier, with fewer bugs has been tried with pure functional programming languages such as Elm. Visible improvement in development time and application quality compared to JavaScript has been recorded. TypeScript is a multi-paradigm programming language, so it is possible to implement these concepts without switching languages. Functors and applicative functors are some of the key concepts of functional programming, useful for processing complex objects and collections of data. As TypeScript is often used to visualize lists of data retrieved from a server, functors and applicative functors could be used to process data into a format required for visualization. This paper presents theoretical explanations of the Functor and Applicative Functor concepts in category theory and provides their implementations in TypeScript, focusing on Maybe and List functors. The use cases were then shown, which demonstrate that they could be useful, especially when abstracting complex concepts, so they could be used and invoked on demand, usually with a simple command.

CITATION:

IEEE format

M. Matović, M. Segedinac, “Functor and Applicative Functor Usage in TypeScript,” in Sinteza 2023 - International Scientific Conference on Information Technology, Computer Science, and Data Science, Belgrade, Singidunum University, Serbia, 2023, pp. 116-123. doi:10.15308/Sinteza-2023-116-123

APA format

Matović, M., Segedinac, M. (2023). Functor and Applicative Functor Usage in TypeScript. Paper presented at Sinteza 2023 - International Scientific Conference on Information Technology, Computer Science, and Data Science. doi:10.15308/Sinteza-2023-116-123

BibTeX format
Download

RefWorks Tagged format
Download