Functional Programming - Algebraic Data Type

An algebraic data type (Algebraic_data_type) is a data type that is the input and the output of its own operations.

Benefits

• An algebraic structure can be composed before being executed. This is a composite type
• An algebraic Structure allows a reasoning and manipulation independently of physical data representation.
• Every operations can be chained to create a pipeline.

Example

Number

All number are algebraic data type.

$$1 + 2 - 3$$

Relational Table

A relation (table, view, …) is an algebraic data type because every operations on a relation output a relation.