code: public static <V> Object[] update(Object[] btree,
                                        Comparator<V> comparator,
                                        Iterable<V> updateWith,
                                        int updateWithLength,
                                        boolean updateWithIsSorted,
                                        UpdateFunction<V> updateF)
      {
          if (btree.length == 0)
              return build(updateWith, updateWithLength, comparator, updateWithIsSorted, updateF);
  
          if (!updateWithIsSorted)
              updateWith = sorted(updateWith, comparator, updateWithLength);
  
          Queue<Builder> queue = modifier.get();
          Builder builder = queue.poll();
          if (builder == null)
              builder = new Builder();
          btree = builder.update(btree, comparator, updateWith, updateF);
          queue.add(builder);
          return btree;
      }
docs: Returns a new BTree with the provided set inserting/replacing as necessary any equal items
  
  @param btree              the tree to update
  @param comparator         the comparator that defines the ordering over the items in the tree
  @param updateWith         the items to either insert / update
  @param updateWithIsSorted if false, updateWith will be copied and sorted to facilitate construction
  @param updateF            the update function to apply to any pairs we are swapping, and maybe abort early
  @param <V>
  @return