Exploring Common Algebraic Data Types Used in Functional Programming
Learn about Algebraic Data Types commonly used in programming. This collection provides examples and adheres to the laws of the Fantasy Land specification, ensuring interoperability. Explore Functor, Semigroup, and Monoid data types, and create reusable interfaces. Upgrade Semigroups to Monoids and define a generalized Monoidal Fold function.
This collection intends to provide viewers with examples of the different Algebraic Data Types that are commonly used in programming. All of these ADTs can be found within the Fantasy Land specification which consists of common algebraic data types used in the realm of web development. By adhering to the different laws that each ADT is built upon, users of the spec are provided with interoperability when using different algebras, ultimately providing them with an incredibly powerful set of tools.
Course Content
Get Acquainted with Functor Data Types in JavaScript by creating an Identity Functor
Use a Maybe functor to halt transformer functions from acting on null or undefined values
Creating Semigroup Data Types from Scratch
Testing Semigroups to Ensure They Abide by the Law of Associativity
Leveraging Semigroups to Create Reusable Max & Min Interfaces
Leveraging Semigroups to Create Reusable Any & All Interfaces
Upgrading Semigroup Data Types to Monoids
Transforming All, Any, Max, & Min from Semigroups to Monoids
Learn How to Define a Generalized Monoidal Fold Function