Content deleted Content added
→Example: Fix language |
→Example: Fix |
||
Line 34:
== Example ==
The following example illustrates the "ontology-oriented" type and declarations style of Go!:<ref name=applied />
<pre>
Gender [[#algebraic|'''::=''']] male | female.
Line 60:
newPerson(Nm, Born, Sx, Hm) '''=>''' $person(Nm, Born, Sx, Hm).
</
{{anchor|algebraic}}The <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.
|