Although the first version is shorter, there some reasons to prefer the second version for stylistic reasons:

It clearly shows that the 'f' is not "altered" in the recursion.

You cannot accidentally 'jump' into the wrong loop. I often have multiple implementations of the same function which differ in laziness or performance. They only differ slightly in name and it happened too often that after copy&paste the recursive call went to a different (and thus wrong) function.

The local loop is probably also more efficient in execution, because the compiler does not need to move the

f

around. However, if this is actually more efficient then the compiler should do such a transformation itself.