code: function dgeom(prob, logp) {
        logp = logp === true;
  
        if (prob <= 0 || prob > 1 || utils.hasNaN(prob)) {
           return function(x) { return NaN; };
        }
  
        return function(x) {
           if (utils.hasNaN(x)) { return NaN; }
           if (x < 0 || Math.round(x) !== x) {
              return logp ? -Infinity : 0;
           }
           return logp ? Math.log(prob) + dbinomLog(x, prob)(0)
                       : prob * Math.exp(dbinomLog(x, prob)(0));
        };
     }
docs: Evaluates the geometric distribution's probability mass function at `x`:
  $$\textrm{dgeom}(p)(x) = p(1-p)^x$$
  for $x \in\left\\{0,1,2,\ldots\right\\}$.
  
  Expects the probability $0 < p\leq 1$.
  
  `logp` defaults to `false`; if `logp` is `true`, returns the
  logarithm of the result.
  
  The implementation uses `dbinom`.
  
  @fullName dgeom(prob, logp)(x)
  @memberof geometric