Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Functional Programming – 15: ADT, Pattern Matching

6.1K views on YouTube

Algebraic data type or ADT is a composite type. There are two common kinds of composite types: Product Type and Sum Type. A Product Type keeps values for each initial type. A Sum Type keeps only one value but that value can be from any of its initial types.
Pattern Matching is the process of matching and extracting data from composite type values.

In this Video:
– Algebraic Data Type (ADT)
– Product Type
– Sum Type (CoProduct, Tagged, Disjoint Union)
– Pattern Matching

Links:
– JavaScript Pattern Matching Proposal – https://github.com/tc39/proposal-pattern-matching