Functor, applicative, and monad
ARANK

Posted on August 31, 2019Functor, applicative, and monad are related concepts that frequently arise in functional programming. These three ideas give a name to common patterns across different operations defined on different data types, so recognizing their occurrences are important. However, these entities are shrouded in mystery, being associated with "category theory," and in particular, monads have been elevated to a divine status around the misconception that they are about "laziness" or "state." Although functors, applicatives, and monads do originate from category theory, their manifestations in functional programming are far removed from their origins and you don't need to understand category theory to use them effectively in your programs.Functor, applicative, and monad are abstract concepts agnostic of any specific programming language. However, we use programming languages to precisely communicate ideas, and therefore I use OCaml in this tutorial, with some occurrences of H…

typeslogicscats.gitlab.io
Related Topics: Functional Programming