Next: , Previous: Tuple types, Up: Other builtin types   [Contents]


3.1.2.3 The universal type

The type univ is defined in the standard library module univ, along with the predicates type_to_univ/2 and univ_to_type/2. With those predicates, values of any type can be converted to the universal type, and back again. The conversion from univ to the original type will check that the value inside the univ has the expected type. The universal type is useful for situations where you need heterogeneous collections.