Top 1,000 Features Creators Resources Blog Explore Download
GitHub icon

Algebraic Data Type

< >
Example from TypeScript:
declare type numOrString = string | number
Example from Coconut:
data 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)

Languages with Algebraic Data Type include TypeScript, Coconut

Read more about Algebraic Data Type on the web: 1.

HTML of this page generated by Features.ts

View source

- Build the next great programming language About Acknowledgements Extensions Day 624 feedback@pldb.io