Content deleted Content added
m →Example |
→Example: use syntaxhighlight tag |
||
Line 36:
The following example illustrates the "ontology-oriented" type and declarations style of Go!:<ref name=applied />
<syntaxhighlight lang="go">
Gender'''::=''' male | female.
Line 62:
newPerson(Nm,Born,Sx,Hm)=>$person(Nm,Born,Sx,Hm).
</syntaxhighlight>
The <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.
|