Method code for $root.generations()

[Turn on line numbering]
arg gen;
var p, out;

out = [this()];
if (gen != 0) {
    for p in (.parents())
        out = union(out, p.generations(gen - 1));
}
return out;

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

Tlon