pr1 Program pr1 gSum TInt add gAdd TInt TInt Assign gSum OpApp Add Var

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
pr1 :: Program
pr1 = (
[("gSum", TInt)],
[add],
[
("gAdd",
([("x", TInt), ("y", TInt)],
[
Assign "gSum" (OpApp Add (Var "x") (Var "y"))
])
),
("main",([],
[
Call "" "gAdd" [Const (I 1), Const (I 2)]
])
)
]
)