scheme sum of the numbers in a list
<p>I am writing a function which give the sum of all the number in a list neglecting words or alphabets. </p>

<pre><code>(define (sum-list ls)
  (cond ((null? ls) 0)
        ((not (number? (car ls))) (sum-list(cdr ls)))
        (else (+ (car ls) (sum-list (cdr ls))))
        )
  )
</code></pre>

<p>(deep-sum '(a 2 (b (1 c)) 3)) => ; should return 6.</p>

<p>but i am getting 5. that mean my code is not reaching in the inner loop </p>