From @purd|e@@ @end|ng |rom gm@||@com  Wed Dec  2 02:33:38 2020
From: @purd|e@@ @end|ng |rom gm@||@com (Abby Spurdle)
Date: Wed, 2 Dec 2020 14:33:38 +1300
Subject: [Rd] all.equal applied to function closures
In-Reply-To: <24518.3448.1707.699927@stat.math.ethz.ch>
References: <B43EED2F-F34F-436E-9822-AFB2A1C954DF@adobe.com>
 <8142836e-d8d5-1faa-fbfe-265a9c6f22e9@gmail.com>
 <CAHqSRuR0CzvyB_CkC2mkxXrJ8XGvGugJDtct6VVOOhCdvU0C5Q@mail.gmail.com>
 <24518.3448.1707.699927@stat.math.ethz.ch>
Message-ID: <CAB8pepydy=MTv7tsYcUs67Zm0rLyYYORYBM9P5GJuuHL-BTFBw@mail.gmail.com>

> Bill, I'm sure you've noticed that we did write  all.equal.environment()
> to work recursively... Actually, I had worked quite a bit at
> that, too long ago to remember details, but the relevant svn log
> entry is
> ------------------------------------------------------------------------
> r66640 | maechler | 2014-09-18 22:10:20 +0200 (Thu, 18 Sep 2014) | 1 line
>
> more sophisticated all.equal.environment(): no longer "simple" infinite recursions
> ------------------------------------------------------------------------

I haven't checked the above reference.
But I would like to note the following behaviour:

    #e group
    e = new.env ()
    e1 = new.env ()
    e$e = e1
    e1$e = e

    #f group
    f = new.env ()
    f1 = new.env ()
    f2 = new.env ()
    f$e = f1
    f1$e = f2
    f2$e = f

    all.equal (e, f)

I tried a number of examples with circular references.
All worked correctly, except for "identical" environments nested an
unequal number of times.

I suspect there may be other special cases.



[Rd] all.equal applied to function closures
Abby Spurdle