Here is a look at the four calls involved when the
recursive_power_of_2
function is set to work on 3
:
Arguments | ^ Returned values 3 | | 8 v | *-------------* | First call | *-------------* 2 | ^ 4 v | *-------------* | Second call | *-------------* 1 | ^ 2 v | *-------------* | Third call | *-------------* 0 | ^ 1 v | *-------------* | Fourth call | *-------------*