From 4d9523e8133b3e3f543cd5a77117c70205f9139a Mon Sep 17 00:00:00 2001 From: Chris Maguire Date: Wed, 6 Feb 2019 14:46:02 -0800 Subject: [PATCH] Correct function definition in exercise 1.11 Missing equals in else branch of function definition. --- content/1-2-procedures.content.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/1-2-procedures.content.html b/content/1-2-procedures.content.html index d36c7c0..1dbc26b 100644 --- a/content/1-2-procedures.content.html +++ b/content/1-2-procedures.content.html @@ -374,7 +374,7 @@

Example: Counting change

-

Exercise 1.11. A function $f$ is defined by the rule that $f(n) = n$ if $n<3$ and $f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3)$ if $n > 3$. Write a procedure that computes $f$ by means of a recursive process. +

Exercise 1.11. A function $f$ is defined by the rule that $f(n) = n$ if $n<3$ and $f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3)$ if $n >= 3$. Write a procedure that computes $f$ by means of a recursive process.

Write a procedure that computes f by means of an iterative process.