IMHO it's an anti-pattern to do:
and currently, you will need to do something close to:
tree = filter(x->!contains(x.name,r"\$|%"), tree);
we should probably allow filter!(pred, tree) to work directly?
(if not not to directly apply predicate on tree.children is a debatable question)