docs: public static BigInteger factorial(BigInteger n) {
      BigInteger nFac = BigInteger.ONE;
      while(n.compareTo(BigInteger.ONE) > 0) {
        nFac = nFac.multiply(n);
        n = n.subtract(BigInteger.ONE);
      }
      return nFac;
    }