code: public void postOrderFilterNodes(final NaryTreeNodeFilter filter) {
          postOrderTraversal(new FnO1ToVoid<IntNaryTree>() {
              @Override
              public void call(IntNaryTree node) {
                  if (!node.isLeaf()) {
                      ArrayList<IntNaryTree> filtChildren = new ArrayList<IntNaryTree>();
                      for (IntNaryTree child : node.children) {
                          if (filter.accept(child)) {
                              filtChildren.add(child);
                          }
                      }
                      node.children = filtChildren;
                  }
              }
          });
          updateStartEnd();
      }
docs: Keep only those nodes which the filter accepts.