Go! (programming language): Difference between revisions

Content deleted Content added
restore syntaxhighlight. Keeps popping up as an error
m Reverted edits by Bgwhite (talk) to last version by Cedar101
Line 35:
The following example illustrates the "ontology-oriented" type and declarations style of Go!:<ref name=applied />
 
<syntaxhighlight>
Gender [[#algebraic|'''::=''']] male | female.
Line 62 ⟶ 61:
newPerson(Nm, Born, Sx, Hm) '''=>''' $person(Nm, Born, Sx, Hm).
 
</syntaxhighlight>
{{anchor|algebraic}}The <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.