[plt-scheme] equal? and shared structure
At Tue, 18 Dec 2007 22:19:01 -0500, Prabhakar Ragde wrote:
> Under what circumstances will equal? terminate with the right answer
> when given cons-structures with sharing (and possibly cycles)? The two I
> concocted for homework seem not to break it, but others do.
`equal?' starts with an `eq?' test. If that happens to short-circuit a
cyclic comparison, then `equal?' will return, otherwise is diverges on
cyclic inputs.
I expect to implement the R6RS `equal?' in the near future.
Matthew