'use strict';

/**
* Evaluate the moment-generating function (MGF) for a beta distribution.
*
* @module @stdlib/math/base/dist/beta/mgf
*
* @example
* var mgf = require( '@stdlib/math/base/dist/beta/mgf' );
*
* var y = mgf( 0.5, 1.0, 1.0 );
* // returns ~1.297
*
* y = mgf( 0.5, 2.0, 4.0 );
* // returns ~1.186
*
* y = mgf( 3.0, 2.0, 2.0 );
* // returns ~5.575
*
* y = mgf( -0.8, 4.0, 4.0 );
* // returns ~0.676
*
* var myMGF = mgf.factory( 0.5, 0.5 );
*
* y = myMGF( 0.8 );
* // returns ~1.522
*
* y = myMGF( 0.3 );
* // returns ~1.168
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
var mgf = require( './mgf.js' );
var factory = require( './factory.js' );


// MAIN //

setReadOnly( mgf, 'factory', factory );


// EXPORTS //

module.exports = mgf;

@@ -18,22 +18,9 @@
 *%0A* 
-Evaluate the m
+M
 omen
@@ -400,24 +400,101 @@
 *%0A* 
-var myMGF = mgf.
+@example%0A* var factory = require( '@stdlib/math/base/dist/beta/mgf' ).factory;%0A*%0A* var mgf = 
 fact
@@ -509,34 +509,36 @@
 , 0.5 );%0A*%0A*
+ var
  y = m
-yMGF
+gf
 ( 0.8 );%0A* /
@@ -567,12 +567,10 @@
  = m
-yMGF
+gf
 ( 0.

Update example