CS153/hw5/hw5programs/compile_object_like.oat
jmug cfe502c598 Add all the assignment code.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-24 18:59:28 -08:00

15 lines
195 B
Text

struct Point {
int x;
int y;
((Point) -> int) f
}
int sum(Point p) {
return p.x + p.y;
}
global p = Point {x=3; y=4; f=sum};
int program (int argc, string[] argv) {
return p.f(p);
}