I'm not sure if this changed. To get a #t with equal? you can add
#:transparent . But be careful because #:transparent is more powerful
than what I expected. For example, it makes available the constructor
of the struct.


#lang racket

(define-struct foo (a b))
(make-foo 3 4)               ; ==> #<foo>
(equal? (make-foo 3 4)
        (make-foo 3 4))      ; ==> #f

(define-struct foo/tr (a b) #:transparent)
(make-foo/tr 3 4)            ; ==> #<foo>
(equal? (make-foo/tr 3 4)
        (make-foo/tr 3 4))   ; ==> #t

Gustavo

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to