Notes from Thomas Greco
Software engineer. TypeScript, functional programming, and the things I build on weekends. Some posts first appear at Hindley Milner Systems and are mirrored here; the rest are mine alone.

Key written here mirrored from hindleymilner.com
Prevent Impossible States Pt. 1 - Union Types
Use TypeScript discriminated unions to require the right fields, narrow object types, and catch unhandled cases.
Fun with Functors
JavaScript arrays are functors. What that means, the two laws they follow, and how to build a Box of your own.