Union types, pattern matching and exhaustiveness in today's JavaScript

Despite being a small library, there is a lot we can do with daggy
Pattern matching and union types are, in my view, one of the concepts in programming which don't get the attention they deserve. In this post, I'm going to show how they can help us write more declarative code.