Compound data type: Difference between revisions
Content deleted Content added
m Omit from bc and dc |
|||
Line 943: | Line 943: | ||
===Algebraic Data Type=== |
===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 |
See [[wp:Algebraic_data_type|algebraic data type]]. The different options ("Empty", "Leaf", "Node") are called ''constructors'', and is associated with 0 or more arguments with the declared types; multiple arguments are declared with a syntax that looks like a tuple type, but it is not really a tuple. |
||
<lang ocaml>type tree = Empty |
<lang ocaml>type tree = Empty |