Jump to content

Compound data type: Difference between revisions

m
m (Omit from bc and dc)
Line 943:
 
===Algebraic Data Type===
See [[wp:Algebraic_data_type|algebraic data type]]. The different options ("Empty", "Leaf", "Node") are called ''constructors'', and is associated with 0 or 1more arguments with the declared types; multiple arguments are handleddeclared with tuplesa syntax that looks like a tuple type, but it is not really a tuple.
 
<lang ocaml>type tree = Empty
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.