> Have you looked at how other implementations of Scheme do this?

I looked at chibi which has a native C impl, and racket which is insanely complex.
No definitive answer yet on how to resolve the edge case properly.

-- vyzo

On Thu, Sep 14, 2017 at 3:28 PM, Marc Feeley <feeley@iro.umontreal.ca> wrote:

> On Sep 14, 2017, at 4:15 AM, Dimitris Vyzovitis <vyzo@hackzen.org> wrote:
>
> Can we get an implementation of equal? that works for recursive structures per r7rs?
> It doesn't need to be called equal?, it can be called equal-shared? for instance.

Yes that would be interesting to have.

> I have an initial implementation that works with shared structures, but there is an edge case:
> If there is a shared object in the structure (without recursion) it needs to be eq? to its counterpart.

Have you looked at how other implementations of Scheme do this?

Marc