I\'m working to understand recursion more in depth and I\'m struggling with WHY it works the way it does. I know that this function returns the square of the previous return
You're thinking about the steps linearly, while the execution is actually nested (represented by indenting):
call p1a(3) call p1a(2) call p1a(1) return 2 return pow(2, 2) return pow(4, 2)
So the final return returns the value 16.
return