If all you do is replace the recursion in that example with one (or more) loops with mutable indexes, chances are the code will get worse.
Oh don’t worry it had more than a half dozen of those nested as well
Oh don’t worry it had more than a half dozen of those nested as well