Blame


1 665c255d 2023-08-04 jrmu ;; Draw an environment diagram to analyze the computation of (memo-fib 3). Explain why memo-fib computes the nth Fibonacci number in a number of steps proportional to n. Would the scheme still work if we had simply defined memo-fib to be (memoize fib)?
2 665c255d 2023-08-04 jrmu
3 665c255d 2023-08-04 jrmu ;; each fibonacci number is only calculated once because the argument and resulting value is stored in the table and looked up whenever possible
4 665c255d 2023-08-04 jrmu ;;