4 ms·
A product type, named after Cartesian product, contains other objects of various types, but it is none of A, B or C itself. If types A, B and C have respective
by HelloNurse 4y ago
A product type, named after Cartesian product, contains other objects of various types, but it is none of A, B or C itself.
If types A, B and C have respectively a, b and c distinct values, their sum type has a+b+c values (each value of each type is allowed) and their product type has abc values (the part of the value that belongs to each type can be chosen independently).