default void update(K key, @NotNull Iterable<V> dataAfter, BiFunction<? super Iterable<V>, ? super Iterable<V>, Difference.Specifier<? extends V, ?>> diffComparator) {
    Iterable<V> dataBefore = get(key);
    boolean beforeEmpty = Iterators.isEmpty(dataBefore);
    boolean afterEmpty = Iterators.isEmpty(dataAfter);
    if (beforeEmpty || afterEmpty) {
      if (!afterEmpty) { // => beforeEmpty
        appendValues(key, dataAfter);
      }
      else if (!beforeEmpty) {
        remove(key);
      }
    }
    else {
      var diff = diffComparator.apply(dataBefore, dataAfter);
      if (!diff.unchanged()) {
        if (Iterators.isEmpty(diff.removed()) && Iterators.isEmpty(diff.changed())) {
          appendValues(key, diff.added());
        }
        else {
          put(key, dataAfter);
        }
      }
    }
  }
default void update(K key, @NotNull Iterable<V> dataAfter, BiFunction<? super Iterable<V>, ? super Iterable<V>, Difference.Specifier<? extends V, ?>> diffComparator)