aboutsummaryrefslogtreecommitdiff
path: root/recurse.hgn
blob: 52b7da41fe27fe6b0fde3dda7fb6bc924b9195e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
main := proc() {
    print_up_to(10)
    exit(0)
}

print_up_to := proc(n) {
    print(n)
    if n > 0 {
        print_up_to(n - 1)
    }
}