code: @NotNull
      public DoubleStream scan(@NotNull final DoubleBinaryOperator accumulator) {
          Objects.requireNonNull(accumulator);
          return new DoubleStream(params, new DoubleScan(iterator, accumulator));
      }
docs: Returns a {@code DoubleStream} produced by iterative application of a accumulation function
  to reduction value and next element of the current stream.
  Produces a {@code DoubleStream} consisting of {@code value1}, {@code acc(value1, value2)},
  {@code acc(acc(value1, value2), value3)}, etc.
  
  <p>This is an intermediate operation.
  
  <p>Example:
  <pre>
  accumulator: (a, b) -&gt; a + b
  stream: [1, 2, 3, 4, 5]
  result: [1, 3, 6, 10, 15]
  </pre>
  
  @param accumulator  the accumulation function
  @return the new stream
  @throws NullPointerException if {@code accumulator} is null
  @since 1.1.6