title: DrRacket/Scheme: Contract violation, number expected?
body: <p>So I have 3 functions defined in scheme, sumlist adds up all numbers in a list, and mean gives me the mean of the list. mean2 calls mean and does the same thing, but i get an error. It says the error is coming from sumlist function.</p>
  
  <pre><code>(define (sumlist lst)(if(null? lst)0 (+(car lst)(sumlist(cdr lst)))))
  (define mean (lambda x(/(sumlist x)(length x))))
  (define mean2 (lambda x(mean x)))
  </code></pre>
  
  <p>This is how i call the functions</p>
  
  <pre><code>(mean 1 2 3 4 5)
  =&gt;3               ;it works
  
  (mean2 1 2 3 4 5)
  +: contract violation
  expected: number?
  given: '(1 2 3 4 5)
  argument position: 1st
  other arguments...:
  0
  </code></pre>
  
  <p>I'm still new too scheme just got introduced to it last week, but it is really frustrating..what am i doing wrong?</p>