title: SICP making change
body: <p>So; I'm a hobbyist who's trying to work through SICP (<a href="http://mitpress.mit.edu/sicp/full-text/book/book.html" rel="noreferrer">it's free!</a>) and there is an example procedure in the first chapter that is meant to count the possible ways to make change with american coins; (change-maker 100) => 292. It's implemented something like:</p>
  
  <pre><code>(define (change-maker amount)
    (define (coin-value n)
      (cond ((= n 1) 1)
            ((= n 2) 5)
            ((= n 3) 10)
            ((= n 4) 25)
            ((= n 5) 50)))
  
    (define (iter amount coin-type)
      (cond ((= amount 0) 1)
            ((or (= coin-type 0) (&lt; amount 0)) 0)
            (else (+ (iter amount
                           (- coin-type 1))
                     (iter (- amount (coin-value coin-type))
                           coin-type)))))
  
    (iter amount 5))
  </code></pre>
  
  <p>Anyway; this is a tree-recursive procedure, and the author "leaves as a challenge" finding an iterative procedure to solve the same problem (ie fixed space).  I have not had luck figuring this out or finding an answer after getting frustrated.  I'm wondering if it's a brain fart on my part, or if the author's screwing with me.</p>