[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))
#f

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

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

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

Thanks in advance,
-pp
-------------- 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.