function factory( k, lambda ) {
	if ( !isNonNegativeInteger( k ) ) {
		return constantFunction( NaN );
	}
	return factoryGamma( k, lambda );
}
Returns a function for evaluating the cumulative distribution function (CDF) for an Erlang distribution with shape parameter `k` and rate parameter `lambda`.

@param {NonNegativeInteger} k - shape parameter
@param {PositiveNumber} lambda - rate parameter
@returns {Function} CDF

@example
var cdf = factory( 2, 0.1 );
var y = cdf( 12.0 );
// returns ~0.337

y = cdf( 8.0 );
// returns ~0.191