λ Support functions! #5

Open
acw wants to merge 59 commits from awick/functions into develop
Showing only changes of commit a3ce53bca2 - Show all commits

View File

@@ -0,0 +1,27 @@
struct Point {
x: u64;
y: u64;
}
struct Line {
start: Point;
end: Point;
}
function slope(l) -> u64
(l.end.y - l.start.y) / (l.end.x - l.start.x);
test = Line {
start: Point {
x: 1;
y: 2;
};
end: Point {
x: 2;
y: 4;
};
};
foo = slope(test);
print foo;