declare type numOrString = string | numberdata Empty()
data Leaf(n)
data Node(l, r)
def size(Empty()) = 0
addpattern def size(Leaf(n)) = 1
addpattern def size(Node(l, r)) = size(l) + size(r)type Tag
= Both
| Fizz
| Buzz
| Other(Int)Languages with Algebraic Data Type include TypeScript, Coconut, Mach, kaikai, Morloc, Lateralus
View all concepts with or missing a hasAlgebraicTypes measurement
Read more about Algebraic Data Type on the web: 1.