Table of Contents

Functional Programming - Algebraic Data Type

About

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

Benefits

Example

Number

All number are algebraic data type.

<MATH> 1 + 2 - 3 </MATH>

Relational Table

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

Relational Data Model