Introduction
Type design patterns help us organize and check our code so it works well and is easy to understand.
When you want to make sure your data has the right shape before using it.
When you need to share data structures clearly between different parts of your program.
When you want to catch mistakes early by checking types while writing code.
When you want to write code that is easier to read and maintain by others.
When you want to reuse common type structures in many places.