default Expression replace(Predicate<Expression> replace, Expression b) {
    if (replace.test(this)) {
      return b;
    } else {
      return switch (this) {
        case Not(var child) -> new Not(child.replace(replace, b));
        case Or(var children) -> new Or(children.stream().map(child -> child.replace(replace, b)).toList());
        case And(var children) -> new And(children.stream().map(child -> child.replace(replace, b)).toList());
        default -> this;
      };
    }
  }
Returns a copy of this expression where every nested instance matching {@code replace} is replaced with {@code b}.
planetiler-core/src/main/java/com/onthegomap/planetiler/expression/Expression.java