The wikipedia articles are terribly written (for math loves or people who just need to refresh their knowledge).
What is a “sum” of types? What is a product of types? Is it possible to Cat x Dog
or Cat + Dog
? What does that even mean?
The wikipedia articles are terribly written (for math loves or people who just need to refresh their knowledge).
What is a “sum” of types? What is a product of types? Is it possible to Cat x Dog
or Cat + Dog
? What does that even mean?
Union types and sum types are two distinct concepts.
Int | Int
is the same type asInt
, butInt + Int
is not the same type asInt
.