code: public void forEach(Procedure<? super Integer> procedure, Executor executor)
      {
          CountDownLatch latch = new CountDownLatch(this.size());
          if (this.goForward())
          {
              // Iterates in forward direction because step value is negative
              for (int i = this.from; i <= this.to; i += this.step)
              {
                  this.executeAndCountdown(procedure, executor, latch, i);
              }
          }
          else
          {
              // Iterates in reverse because step value is negative
              for (int i = this.from; i >= this.to; i += this.step)
              {
                  this.executeAndCountdown(procedure, executor, latch, i);
              }
          }
          try
          {
              latch.await();
          }
          catch (InterruptedException e)
          {
              // do nothing here;
          }
      }
docs: This method executes a void procedure against an executor, passing the current index of the
  interval.