Functional TypeScript: Either vs Validation
Adapted from A Tale of 3 Nightclubs
Act Zero: 10:15 Saturday Night
In which we will see how to use the type system to handle failure with the Either type and the Validation type.
Immutability is one of the building blocks of functional programming. An immutable object is an object whose state cannot be modified after it is created. Immutability allows for referential transparency: there is no difference between a value, and a reference to that value. Immutability…