title: racket function, is it wrong or am i missing somethng
body: <p>Found this function in the book realm of racket:</p>
  
  <pre><code>(define (my-filter pred lst)
    (cond [(empty? lst) empty]
          [(pred (first lst))
           (cons (first lst) (my-filter (rest lst)))]
          [else (my-filter (rest lst))]))
  </code></pre>
  
  <p>Calling it with:</p>
  
  <pre><code>(my-filter (lambda (i) (&gt; i 5)) `(1 2 3 4 5 6 7 8))
  </code></pre>
  
  <p>gives:</p>
  
  <pre><code>my-filter: arity mismatch;
   the expected number of arguments does not match the given number
    expected: 2
    given: 1
    arguments...:
     '(2 3 4 5 6 7 8)
  </code></pre>
  
  <p>So i changed it to:</p>
  
  <pre><code>(define (my-filter pred lst)
    (cond [(empty? lst) empty]
          [(pred (first lst))
           (cons (first lst) (my-filter pred (rest lst)))]
          [else (my-filter pred (rest lst))]))
  </code></pre>
  
  <p>And now it works fine. So i was wandering if there's anything i missed there or if the book is wrong?</p>