This is where the loop-transformation is done. This function translates the body of a recursive function into a looping function.
build_transformed_function(fun, fun_name)
The original function
The name of the function we are transforming
The body of the transformed function.