In programming language theory, an algebraic data type (ADT) is a kind of composite type, i.e., a type constructed with multiple primitive data types. There are two main types of ADTs:

  • Sum types (also called tagged/discriminated unions) represent a value that can be one of several different forms.
  • Product types represent a combination of several different values.

See also