final Formula[] visited = new Formula[formula.size()];
boolean allSame = true;
for(int i = 0 ; i < visited.length; i++) {
final Formula child = formula.child(i);
visited[i] = child.accept(this);
allSame = allSame && visited[i]==child;
}
ret = allSame ? formula : Formula.compose(formula.op(), visited);
return cache(formula,ret);