Unit type¶
Unit
is a special built-in type with only a single value, which
can be written unit
(or ■
, U+25A0 BLACK SQUARE).
Disco> :type unit
■ : Unit
Disco> unit
■
Disco> ■
■
This is not very useful on its own, but becomes very useful when combined with sum and pair types to create custom recursive algebraic types.