code: function(df) {
           return {
              d: function(x, logp) { return dchisq(df, logp)(x); },
              p: function(q, lowerTail, logp) {
                 return pchisq(df, lowerTail, logp)(q);
              },
              q: function(p, lowerTail, logp) {
                 return qchisq(df, lowerTail, logp)(p);
              },
              r: function() { return rchisq(df)(); }
           };
        }
docs: Returns an object representing a chi squared distribution for `df` degrees
  of freedom, with properties `d`, `p`, `q`, `r`.
  ```
  chisq(df).d(x, logp)            // same as dchisq(df, logp)(x)
  chisq(df).p(x, lowerTail, logp) // same as pchisq(df, lowerTail, logp)(x)
  chisq(df).q(x, lowerTail, logp) // same as qchisq(df, lowerTail, logp)(x)
  chisq(df).r()                   // same as rchisq(df)()
  ```
  @memberof chisq