Fix precedence bugs, test on homework

This commit is contained in:
Jan-Niclas Loosen
2025-12-09 19:58:11 +01:00
parent 4e6f93b353
commit b3e20a52eb
6 changed files with 122 additions and 38 deletions

View File

@@ -0,0 +1,16 @@
let f(x, y) {
if (x == 0) then
let g(x, z) {
x * y + z
} in g(2 * y, x)
else
x + 1
}
g (a, i) {
while (i > 0) do {
a = a * f(a, i);
i = i - 1
};
a + 42
}
in f (1, 2); g(3, 3)