Not equivalent, I think, @tagawa: the callback has to be invoked only at the end of all executions of getDataForType() and digDownData(). That's why it's carried forward from one function to the next. I think your change would run the callback before all data is retrieved, in some cases.
Not equivalent, I think, @tagawa: the callback has to be invoked only at the end of all executions of
getDataForType()
anddigDownData()
. That's why it's carried forward from one function to the next. I think your change would run the callback before all data is retrieved, in some cases.