Slide 66
Slide 66 text
Algebraic Data Types
66
Product Type
data BrowserVendor = Vendor Browser Bool
We already knew that cardinality of Browser is 5 and cardinality of Bool is 2.
[
Chrome True, Chrome False,
Firefox True, Firefox False,
Safari True, Safari False,
Opera True, Opera False,
Edge True, Edge False,
] If we try to enumerate this data type,
then we can get the cardinality with 10
which is equal to 2 * 5.