The Racket documentation for equal? says equality is recursively defined; if both v1 and v2 contain reference > cycles, they are equal when the infinite unfoldings of the values would be > equal.
I didn't quite believe my ears! :-) So I tried it with two pairs (a b...) and four pairs (a b a b...) (let ((x (let ((ph (make-placeholder #f))) (let ((x0 (cons 'a (cons 'b ph)))) (placeholder-set! ph x0) (make-reader-graph x0)))) (y (let ((ph (make-placeholder #f))) (let ((y0 (cons 'a (cons 'b (cons 'a (cons 'b ph)))))) (placeholder-set! ph y0) (make-reader-graph y0))))) (write x) (newline) (write y) (newline) (equal? x y)) => #0=(a b . #0#) #0=(a b a b . #0#) #t Wow! How does Racket do that? -- 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.