You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sicp-all-tasks/sicp/3_002e57

15 lines
415 B

Exercise 3.57: How many additions are performed
when we compute the
n
th
Fibonacci number using the definition of
fibs based on the add-streams procedure? Show that the number of
additions would be exponentially greater if we had implemented (delay ⟨exp⟩)
simply as (lambda () ⟨exp⟩), without using the
optimization provided by the memo-proc procedure described in
3.5.1.192