IMHO, it is not a tail recursion.
The key difference it that in tail recursion, we calculate the value first then we do the recursion, which means we don't need to keep the recursion stack. Whileas in a non-tail recursion, we do the recursion first and then we calucualte. So we have to store the recursion stack before we can calcualte finally.
In your case, before we reach the end of the first recursion, we cann't execute the print
step, which make we have to store the x
value in the stack. If the first recursion call is removed it should be a tail recursion.
Update:
according to https://en.wikipedia.org/wiki/Tail_call, a tail-recursion should be refer to a call. If we talk about tail-recursion on a function call's point, the first call in your program should be a non-tail-resursion one, while the second one is a tail-recursion call.
But for the whole program I think it is not a tail recursion
one as a whole.