Content deleted Content added
Loadmaster (talk | contribs) →Example: indentation for clarity; does this language use any spaces between tokens? |
Another n00b (talk | contribs) Caps lock is preferable. |
||
Line 37:
== Example ==
The following example illustrates the "ontology-oriented" type and declarations style of Go!:<ref name=applied />
<div style="text-transform: uppercase;">
<source lang="javascript">
Gender::= male | female.
Line 64 ⟶ 66:
newPerson(Nm,Born,Sx,Hm)=>$person(Nm,Born,Sx,Hm).
</source>
</div>
The <code>::=</code> rule defines a new [[algebraic data type]], a [[data type]] with only data constructors.
|