Examples

Recursion

Tail calls are loops. Everything else is marked recur.

main (print)

# A call in tail position is a loop: no memory grows.
sumTo(n int, acc int) int
    if n == 0
        acc
    sumTo(n - 1, acc + n)

# A call with work waiting after it must be marked recur.
# The compiler checks the mark both ways.
factorial(n int) int
    if n <= 1
        1
    n * recur factorial(n - 1)

main()
    a = sumTo(1000000, 0)
    b = factorial(10)
    print.line("{a} {b}")
500000500000 3628800