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

	/**
	* Evaluates the cumulative distribution function (CDF) for a Laplace 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 ) / b;
		if ( x < mu ) {
			return 0.5 * exp( z );
		}
		return 1.0 - (0.5 * exp( -z ));
	}
}
Returns a function for evaluating the cumulative distribution function (CDF) for a Laplace distribution with location parameter `mu` and scale parameter `b`.

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

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

var y = cdf( 1.0 );
// returns ~0.132

y = cdf( 4.0 );
// returns ~0.743