Tail recursion.