function factory( a, b ) {
	var ninv;
	if (
		isnan( a ) ||
		isnan( b ) ||
		!isInteger( a ) ||
		!isInteger( b ) ||
		a > b
	) {
		return constantFunction( NaN );
	}
	ninv = 1.0 / ( b - a + 1.0 );
	return pmf;

	/**
	* Evaluates the probability mass function (PMF) for a discrete uniform distribution.
	*
	* @private
	* @param {number} x - input value
	* @returns {number} evaluated PMF
	*
	* @example
	* var y = pmf( 2.0 );
	* // returns <number>
	*/
	function pmf( x ) {
		if ( isnan( x ) ) {
			return NaN;
		}
		if ( x < a || x > b || !isInteger( x ) ) {
			return 0.0;
		}
		return ninv;
	}
}
Returns a function for evaluating the probability mass function (PMF) for a discrete uniform distribution with minimum support `a` and maximum support `b`.

@param {integer} a - minimum support
@param {integer} b - maximum support
@returns {Function} PMF

@example
var pmf = factory( 0, 10 );
var y = pmf( 2.0 );
// returns ~0.091

y = pmf( 12.0 );
// returns 0.0