Compound data type: Difference between revisions
Content added Content deleted
No edit summary |
m (copy edit - wiki link to wikipedia) |
||
Line 111: | Line 111: | ||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |
||
{{works with | AutoHotkey_L}} |
{{works with | AutoHotkey_L}} |
||
[ |
[[wp:Monkey_patch|monkeypatched]] example. |
||
<lang AutoHotkey>point := Object() |
<lang AutoHotkey>point := Object() |
||
Line 285: | Line 285: | ||
===Algebraic Data Type=== |
===Algebraic Data Type=== |
||
See [ |
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. |
||
data Tree = Empty |
data Tree = Empty |
||
Line 475: | Line 475: | ||
===Algebraic Data Type=== |
===Algebraic Data Type=== |
||
See [ |
See [[wp:Algebraic_data_type|algebraic data type]]. The different options ("Empty", "Leaf", "Node") are called ''constructors'', and is associated with 0 or 1 arguments with the declared types; multiple arguments are handled with tuples. |
||
<lang ocaml>type tree = Empty |
<lang ocaml>type tree = Empty |
||
Line 789: | Line 789: | ||
===Algebraic Data Type=== |
===Algebraic Data Type=== |
||
See [ |
See [[wp:Algebraic_data_type|algebraic data type]]. The different options ("Empty", "Leaf", "Node") are called ''constructors'', and is associated with 0 or 1 arguments with the declared types; multiple arguments are handled with tuples. |
||
<lang sml>datatype tree = Empty |
<lang sml>datatype tree = Empty |