docs: public static void step(Number self, Number to, Number stepNumber, Closure closure) {
          if (self instanceof BigDecimal || to instanceof BigDecimal || stepNumber instanceof BigDecimal) {
              final BigDecimal zero = BigDecimal.valueOf(0, 1);  // Same as "0.0".
              BigDecimal self1 = (self instanceof BigDecimal) ? (BigDecimal) self : new BigDecimal(self.toString());
              BigDecimal to1 = (to instanceof BigDecimal) ? (BigDecimal) to : new BigDecimal(to.toString());
              BigDecimal stepNumber1 = (stepNumber instanceof BigDecimal) ? (BigDecimal) stepNumber : new BigDecimal(stepNumber.toString());
              if (stepNumber1.compareTo(zero) > 0 && to1.compareTo(self1) > 0) {
                  for (BigDecimal i = self1; i.compareTo(to1) < 0; i = i.add(stepNumber1)) {
                      closure.call(i);
                  }
              } else if (stepNumber1.compareTo(zero) < 0 && to1.compareTo(self1) < 0) {
                  for (BigDecimal i = self1; i.compareTo(to1) > 0; i = i.add(stepNumber1)) {
                      closure.call(i);
                  }
              } else if(self1.compareTo(to1) != 0)
                  throw new GroovyRuntimeException("Infinite loop in " + self1 + ".step(" + to1 + ", " + stepNumber1 + ")");
          } else if (self instanceof BigInteger || to instanceof BigInteger || stepNumber instanceof BigInteger) {
              final BigInteger zero = BigInteger.valueOf(0);
              BigInteger self1 = (self instanceof BigInteger) ? (BigInteger) self : new BigInteger(self.toString());
              BigInteger to1 = (to instanceof BigInteger) ? (BigInteger) to : new BigInteger(to.toString());
              BigInteger stepNumber1 = (stepNumber instanceof BigInteger) ? (BigInteger) stepNumber : new BigInteger(stepNumber.toString());
              if (stepNumber1.compareTo(zero) > 0 && to1.compareTo(self1) > 0) {
                  for (BigInteger i = self1; i.compareTo(to1) < 0; i = i.add(stepNumber1)) {
                      closure.call(i);
                  }
              } else if (stepNumber1.compareTo(zero) < 0 && to1.compareTo(self1) < 0) {
                  for (BigInteger i = self1; i.compareTo(to1) > 0; i = i.add(stepNumber1)) {
                      closure.call(i);
                  }
              } else if(self1.compareTo(to1) != 0)
                  throw new GroovyRuntimeException("Infinite loop in " + self1 + ".step(" + to1 + ", " + stepNumber1 + ")");
          } else {
              int self1 = self.intValue();
              int to1 = to.intValue();
              int stepNumber1 = stepNumber.intValue();
              if (stepNumber1 > 0 && to1 > self1) {
                  for (int i = self1; i < to1; i += stepNumber1) {
                      closure.call(i);
                  }
              } else if (stepNumber1 < 0 && to1 < self1) {
                  for (int i = self1; i > to1; i += stepNumber1) {
                      closure.call(i);
                  }
              } else if(self1 != to1)
                  throw new GroovyRuntimeException("Infinite loop in " + self1 + ".step(" + to1 + ", " + stepNumber1 + ")");
          }
      }