public void update(Range<Double> range, UnaryOperator<T> operator) {
    var overlaps = new ArrayList<>(items.subRangeMap(range).asMapOfRanges().entrySet());
    for (var overlap : overlaps) {
      items.putCoalescing(overlap.getKey(), operator.apply(overlap.getValue()));
    }
  }
Change each of the distinct values over {@code range} to the result of applying {@code operator} to the existing
value.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/MergingRangeMap.java