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

	/**
	* Evaluates the cumulative distribution function (CDF) for a Gumbel distribution.
	*
	* @private
	* @param {number} x - input value
	* @returns {Probability} evaluated CDF
	*
	* @example
	* var y = cdf( -2.0 );
	* // returns <number>
	*/
	function cdf( x ) {
		var z;
		if ( isnan( x ) ) {
			return NaN;
		}
		z = ( x - mu ) / beta;
		return exp( -exp( -z ) );
	}
}
Returns a function for evaluating the cumulative distribution function (CDF) for a Gumbel distribution with location parameter `mu` and scale parameter `beta`.

@param {number} mu - location parameter
@param {PositiveNumber} beta - scale parameter
@returns {Function} CDF

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

var y = cdf( 10.0 );
// returns ~0.965

y = cdf( -2.0 );
// returns ~0.143