title: Class methods can't be used for andmap?
body: <p>While working on a Racket program for managing employee time sheets, I found that I cannot use a class's member method for <code>andmap</code>.</p>
  
  <pre><code>#lang racket
  
  (define example%
    (class object%
  
      (super-new)
  
      (define/public (is-even? n)
        (even? n))
  
      (define/public (test)
        (println
         ;; Next line causes error.
         (andmap is-even? '(2 3 4))))))
         ;; if the following line is used, everything works properly
         ;;(andmap even? '(2 3 4))))))
  
  (let ([tmp (new example%)])
    (send tmp test))
  </code></pre>
  
  <p>DrRacket gives the following error message on attempt to run this simple program:</p>
  
  <blockquote>
    <p>class: misuse of method (not in application) in: is-even?</p>
  </blockquote>
  
  <hr>
  
  <p>Of course I don't <strong>need</strong> to use <code>andmap</code> ... It is just a luxury since I can feed a lambda and the result of <code>map</code> into <code>addmap</code> and get the same functionality...</p>
  
  <p>Unfortunately, this doesn't work either, giving the same error as the previous program...</p>
  
  <pre><code>#lang racket
  
  (define example%
    (class object%
  
      (super-new)
  
      (define/public (iseven? n)
        (even? n))
  
      (define/public (test)
        (println
         (let ([true? (lambda
                          (v)
                        (equal? v #t))])
           (andmap true?
                   ;; map also refuses to use my class's method...
                   ;; so much for my hacky workaround idea.
                   (map iseven? '(2 3 4))))))))
  
  (let ([tmp (new example%)])
    (send tmp test))
  </code></pre>
  
  <p>I like to fix my own problems so I looked up the given error message. I didn't find anything related. This leads to the following question: Why can't <code>andmap</code>, <code>map</code>, etc. use a class's method for their procedure argument?</p>
  
  <p><strong>PS:</strong> The actual class is significantly more complicated, but this is a minimal, verifiable example. :)</p>