title: How to stream over a range of BigIntegers?
body: <p>Hello I currently have this piece of code for finding factorial which is work fine </p>
  
  <pre class="lang-java prettyprint-override"><code>public static BigInteger factorial(BigInteger n) {
      BigInteger sum = BigInteger.ONE;
      for (BigInteger i = BigInteger.ONE; i.compareTo(n) &lt;= 0; i = i.add(BigInteger.ONE)) {
          sum = sum.multiply(i);
      }
      return sum;
  }
  
  </code></pre>
  
  <p>What I want to achieve is to convert this to a <code>Stream&lt;BigInteger&gt;</code> and write it like this</p>
  
  <pre class="lang-java prettyprint-override"><code>public static BigInteger factorial(BigInteger n) {
      return getBigIntegerStream(n).reduce(BigInteger.ONE, BigInteger::multiply);
  }
  </code></pre>
  
  <p>So my question is how I can get a <code>Stream&lt;BigInteger&gt;</code> similar to how I can declare an <code>IntStream</code>?</p>
  
  <pre class="lang-java prettyprint-override"><code>IntStream.range(1, myInt);
  </code></pre>