Skip to content

Product Type

A product type is the result of the product operation on algebraic types. The cardinality of a product type is the product of it's fields. For example

data MyType = { isTrue: Boolean
              , isFalse: Boolean
              }
|MyType| = |Boolean| \cdot |Boolean| = 2 \cdot 2 = 4

Product types have a monoidal identity of Unit. |Unit| = 1.

References