stop_or_call n, f: (Nat -> Nat), g: (Nat -> Nat) =
    if n <= 0:
        do 1
        do:
            m = n - 1
            assert m in Nat
            g (f m)

fact(n: Nat): Nat =
    stop_or_call n, fact, (r, ) -> r * n

print! fact
print! fact 5
