title: How to count the number of zeros in a list?
body: <p>I'm new to Scheme, so can anyone give me an example? There's no local variable in Scheme, so how can I keep track of the number of zeros that being encountered. </p>
  
  <p>I tried</p>
  
  <pre><code>#lang scheme
  (define zeroes
    (lambda (ll)
      (cond ((null? ll) 
             0)
            (else (= 0 (car ll))))
      (zeroes (cdr ll))
    )
  )
  </code></pre>
  
  <p>But the compiler complained:</p>
  
  <pre><code>cdr: expects argument of type &lt;pair&gt;; given ()
  </code></pre>
  
  <p>Thanks,</p>