code: function rgeom(prob) {
        var scale;
  
        if (prob <= 0 || prob > 1) { return function() { return NaN; }; }
  
        scale = prob / (1 - prob);
  
        return function() {
           return rpois(rexp(scale)())();
        };
     }
docs: Returns a random variate from the geometric distribution.
  
  Expects the probability parameter $0 < p \leq 1$.
  
  Following R's code (rgeom.c)
  @fullName rgeom(prob)()
  @memberof geometric