Skip to content
Prev 59188 / 63421 Next

all.equal applied to function closures

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.