code: @NotNull
      public OptionalDouble mapToDouble(@NotNull ToDoubleFunction<? super T> mapper) {
          if (!isPresent()) return OptionalDouble.empty();
          return OptionalDouble.of(mapper.applyAsDouble(value));
      }
docs: Invokes mapping function on inner value if present.
  
  @param mapper  mapping function
  @return an {@code OptionalDouble} with transformed value if present,
  otherwise an empty {@code OptionalDouble}
  @throws NullPointerException if value is present and
  {@code mapper} is {@code null}
  @since 1.1.4