code: public void forEach(@NotNull LongConsumer action) {
          while (iterator.hasNext()) {
              action.accept(iterator.nextLong());
          }
      }
docs: Performs an action for each element of this stream.
  
  <p>This is a terminal operation.
  
  @param action  the action to be performed on each element