Method code for $foundation<$root>.descendants()

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

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

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

Tlon