I think this article makes the "sum" and "product" terms out to be very complicated, when in fact it's quite simple. If we have two enums enum Bool { True, False } enum Status { Waiting, Successful, Failed } We can combine them into a product type, like a tuple, or a sum type, like a union. type Product = (Bool, Status) type Sum = Bool | Status Now, we ask ourselves, what are the valid values of type Product? (True,…
Fff
Tff
Ftf
Fft
Ttf
Tft
Ftt
Ttt
All as possible implementations of that function. Neat...