introduce ir nop to fix loop bugs

This commit is contained in:
Alex Zenla
2025-07-24 22:30:18 -07:00
parent 837e0c1b38
commit 69230deefc
11 changed files with 65 additions and 12 deletions

17
examples/ack.pork Normal file
View File

@ -0,0 +1,17 @@
/* ackermann function */
func ack(m: int32, n: int32): int32 {
if m == 0 {
return n + 1
}
if n == 0 {
return ack(m - 1, 1)
}
return ack(m - 1, ack(m, n - 1))
}
export func main() {
let result: int32 = ack(3, 1)
println(result)
}