code: public OptionalDouble minByInt(DoubleToIntFunction keyExtractor) {
          return collect(PrimitiveBox::new, (box, d) -> {
              int key = keyExtractor.applyAsInt(d);
              if (!box.b || box.i > key) {
                  box.b = true;
                  box.i = key;
                  box.d = d;
              }
          }, PrimitiveBox.MIN_INT).asDouble();
      }
docs: Returns the minimum element of this stream according to the provided key
  extractor function.
  
  <p>
  This is a terminal operation.
  
  @param keyExtractor a non-interfering, stateless function
  @return an {@code OptionalDouble} describing the first element of this
  stream for which the lowest value was returned by key extractor,
  or an empty {@code OptionalDouble} if the stream is empty
  @since 0.1.2