[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] equal?

On Wed, Nov 14, 2012 at 7:35 PM, Alan Watson <alan@x> wrote:
There may well be better ways to say this. Alternatively, I think one could say that the leafs are compared by eqv? (since structure has been unfolded).

Almost.   Not all leaf-less graphs are equal? to each other.     I think that all leafless graphs consisting only of pairs are,  but once you start interspersing vectors with pairs, this should affect equal?-ity.   Consider "paths" which are sequences of operations like car, cdr, (vector-ref <node> 0), (vector-ref <node> 1), ....   For equal? graphs, a path walked in one should be walkable in the other.   If you arrive at a leaf, then the leaves are string-equal?, bytevector-equal?, or just eqv?

This is my mental model, but someone please correct me if I'm mistaken.
Scheme-reports mailing list