[racket] equal? and objects

From: Eduardo Bellani (ebellani at gmail.com)
Date: Tue Dec 21 12:33:06 EST 2010

I am trying to implement an is-equal? function like this:

    ;; is-equal? : the-obj -> boolean
    (define/public (is-equal? another-obj)
      (andmap (λ (field-name)
                 (equal? (get-field field-name another-obj)
                         field-name))
              (field-names this)))

Could anyone help me as to why this does not work, or an alternative
approach?

Thanks in advance.
-- 
Eduardo Bellani

omnia mutantur, nihil interit.


Posted on the users mailing list.