Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/1-2-procedures.content.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ <h4>Example: Counting change</h4>


<div class="exercise">
<p> <b> Exercise 1.11. </b> A function $f$ is defined by the rule that $f(n) = n$ if $n&lt;3$ and $f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3)$ if $n &gt; 3$. Write a procedure that computes $f$ by means of a recursive process.
<p> <b> Exercise 1.11. </b> A function $f$ is defined by the rule that $f(n) = n$ if $n&lt;3$ and $f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3)$ if $n &gt;= 3$. Write a procedure that computes $f$ by means of a recursive process.

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

Expand Down