Algebraic data type
= Algebraic data type
{wiki}
A type whose values are described by named <data constructors> with specified fields. For example, `data Tree a = One a | Two (Tree a) (Tree a)` describes a <leaf-labelled binary tree>. Its two alternatives are distinguished by <pattern matching>; the recursive fields give a <recursive type>.