
don't write recursive code. its bad. for the stack and people mind.
Well it was pseudocode, just to get the general idea.
In more detail: (this does something different than the example above)
function DeepHash( input , depth )
{
h = '';
while(0≤(depth--)) h = Hash(h+input); // where Hash(x) is a regular hasing function, e.g. sha256
return h;
}
DeepHash(input,1) is the same as Hash(input)
DeepHash(input,2) gives Hash(Hash(input)+input)
DeepHash(input,3) gives Hash(Hash(Hash(input)+input))+input)
etc.
also your code is kind of broken... what does Hash with only one input?
It was a polymorphic function, a two-parameter alternative to the already existing Hash function with one input (i.e. regular sha256).