[plt-scheme] structures and equal?

From: Pedro Pinto (ppinto at cs.cmu.edu)
Date: Mon Sep 23 20:59:28 EDT 2002

Hi there,

I am trying to compare two instances of a simple structure for value equality. Thus:

(define-struct location (x y))

(equal? (make-location 0 0) (make-location 0 0))

(eq? (make-location 0 0) (make-location 0 0))

(eqv? (make-location 0 0) (make-location 0 0))

I have searched the PLT docs and was led to believe that equal? should just work. Any  ideas?

Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20020923/7587d954/attachment.html>

Posted on the users mailing list.