Method code for $root.ancestry()

[Turn off line numbering]
  1: arg gen;
  2: var i, out;
  3: 
  4: out = [];
  5: if (type(gen) == 'objnum) {
  6:     for i in (.ancestors()) {
  7:         if (i.has_ancestor(gen))
  8:             out += [i];
  9:     }
 10:     return out;
 11: }
 12: if (gen != 0) {
 13:     for i in (.parents())
 14:         out = union(out, i.ancestry(gen - 1));
 15: }
 16: return out;
 17: 
 18: // $#Edited: 18 Jul 99 13:31 $brandon

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

the Cold Dark