Content deleted Content added
Cybercobra (talk | contribs) →Example: needs attribution |
Cybercobra (talk | contribs) m →Example |
||
Line 35:
== Example ==
{{unreferencedsection}}
The following example illustrates the 'ontology-oriented' type and declarations style of Go!.
<source lang="javascript">
Line 55:
newPerson:[string,day,Gender,string]=>person.
newPerson(Nm,Born,Sx,Hm)=>$person(Nm,Born,Sx,Hm).
</source>{{uncited quote}}
The <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.
|