function factory( mu, beta ) {
	if (
		isnan( mu ) ||
		isnan( beta ) ||
		beta <= 0.0
	) {
		return constantFunction( NaN );
	}
	return mgf;

	/**
	* Evaluates the moment-generating function (MGF) for a Gumbel distribution.
	*
	* @private
	* @param {number} t - input value
	* @returns {number} evaluated MGF
	*
	* @example
	* var y = mgf( 0.5 );
	* // returns <number>
	*/
	function mgf( t ) {
		if ( t >= 1.0/beta ) {
			return NaN;
		}
		return gamma( 1.0 - (beta * t) ) * exp( mu * t );
	}
}
Returns a function for evaluating the moment-generating function (MGF) of a Gumbel distribution with location parameter `mu` and scale parameter `b`.

@param {number} mu - mean
@param {PositiveNumber} beta - scale parameter
@returns {Function} MGF

@example
var mgf = factory( 0.0, 3.0 );

var y = mgf( 0.2 );
// returns ~2.218

y = mgf( -1.0 );
// returns 6.0