sub moveto { my ($p, @ch) = @_; foreach $c (@ch) { $c.parent = $p; push @p.children, $c; $c.siblings = (listsubtract(\@ch, [$c]); } }