Go! (programming language): Difference between revisions

Content deleted Content added
m Make disambig link more explanatory
Line 35:
== Example ==
{{Unreferenced section|date=July 2010}}
The following example illustrates the 'ontology-oriented' type and declarations style of Go!.:{{uncited quote|date=July 2010}}
 
<source lang="javascript">
Gender::= male | female.
Line 55 ⟶ 54:
newPerson:[string,day,Gender,string]=>person.
newPerson(Nm,Born,Sx,Hm)=>$person(Nm,Born,Sx,Hm).
</source>{{Cite quote|date=July 2010}}
 
The <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.