blob: 27f58f02e4bcca637cdc6d03ee51bc27fecaee9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
pkg "point";
#export Point ::= struct {
x, y: int;
};
#export mk_point ::= fn(x, y: int) p : Point {
p.x = x;
p.y = y;
};
mk_point2 ::= fn(x, y:int) p: Point {
p = mk_point(x*x, y*y);
};
|