code: function(a, b) {
           return {
              d: function(x, logp) { return dbeta(a, b, logp)(x); },
              p: function(q, lowerTail, logp) {
                 return pbeta(a, b, lowerTail, logp)(q);
              },
              q: function(p, lowerTail, logp) {
                 return qbeta(a, b, lowerTail, logp)(p);
              },
              r: function(n) { return rbeta(a, b)(n); }
           };
        }
docs: Returns an object representing a beta distribution, with properties `d`, `p`, `q`, `r`.
  ```
  betadistr(a, b).d(x, logp)            // same as dbeta(a, b, logp)(x)
  betadistr(a, b).p(x, lowerTail, logp) // same as pbeta(a, b, lowerTail, logp)(x)
  betadistr(a, b).q(x, lowerTail, logp) // same as qbeta(a, b, lowerTail, logp)(x)
  betadistr(a, b).r(n)                  // same as rbeta(a, b)(n)
  ```
  @memberof beta