Method code for $root.anc2()

[Turn on line numbering]
var i, c, parent, d;

d = #[];
for parent in (parents())
    d = dict_add(d, parent, 1);
while ((| (c = dict_keys(d)[++i]) |)) {
    for parent in (c.parents()) {
        pause();
        d = dict_add(d, parent, 1);
    }
    pause();
}
return dict_keys(d);

["// Created as a part of ColdCore, see: @help Credit"]

the Cold Dark