In Fig. 7.15 is a ML function main that computes Fibonacci numbers in a nonstandard way. Function f I b O will compute the nth Fibonacci number for any n > 0. Nested within in is f I b l , which computes the nth Fibonacci number on the assumption n > 2, and nested within f I b l is f ib2, which assumes n > 4. Note that neither f I b l nor f ib2 need to check for the basis cases. Show the stack of activation records that result from a call to main, up until the time that the first call (to f I b O(l)) is about to return. Show the access link in each of the activation records on the stack.
Fig. 7.15
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here