code: public <E extends Exception> List<T> scan(final Try.BiFunction<? super T, ? super T, T, E> accumulator) throws E {
          N.checkArgNotNull(accumulator);
  
          final List<T> result = new ArrayList<>();
          final Iterator<T> iter = iterator();
          T next = null;
  
          if (iter.hasNext()) {
              result.add((next = iter.next()));
          }
  
          while (iter.hasNext()) {
              result.add((next = accumulator.apply(next, iter.next())));
          }
  
          return result;
      }
docs: Returns a {@code Stream} produced by iterative application of a accumulation function
  to an initial element {@code identity} and next element of the current stream.
  Produces a {@code Stream} consisting of {@code identity}, {@code acc(identity, value1)},
  {@code acc(acc(identity, value1), value2)}, etc.
  
  <p>Example:
  <pre>
  <code>
  Seq.of(new Integer[0]).scan((a, b) -> a + b) => []
  Seq.of(1).scan((a, b) -> a + b) => [1]
  Seq.of(1, 2).scan((a, b) -> a + b) => [1, 3]
  Seq.of(1, 2, 3).scan((a, b) -> a + b) => [1, 3, 6]
  Seq.of(1, 2, 3, 3, 2, 1).scan((a, b) -> a + b) => [1, 3, 6, 9, 11, 12]
  </code>
  </pre>
  
  @param accumulator the accumulation function
  @return