code: public OptionalLong minByLong(LongUnaryOperator keyExtractor) {
          long[] result = collect(() -> new long[3], (acc, l) -> {
              long key = keyExtractor.applyAsLong(l);
              if (acc[2] == 0 || acc[1] > key) {
                  acc[0] = l;
                  acc[1] = key;
                  acc[2] = 1;
              }
          }, (acc1, acc2) -> {
              if (acc2[2] == 1 && (acc1[2] == 0 || acc1[1] > acc2[1]))
                  System.arraycopy(acc2, 0, acc1, 0, 3);
          });
          return result[2] == 1 ? OptionalLong.of(result[0]) : OptionalLong.empty();
      }
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 OptionalLong} describing the first element of this
  stream for which the lowest value was returned by key extractor,
  or an empty {@code OptionalLong} if the stream is empty
  @since 0.1.2