function increwmean( alpha ) {
	var m;
	if ( !isNonNegativeNumber( alpha ) ) {
		throw new TypeError( format( 'invalid argument. Must provide a nonnegative number. Value: `%s`.', alpha ) );
	}
	if ( alpha < 0.0 || alpha > 1.0 ) {
		throw new RangeError( format( 'invalid argument. Must provide a nonnegative number on the interval: [0, 1]. Value: `%f`.', alpha ) );
	}
	return accumulator;

	/**
	* If provided a value, the accumulator function returns an updated mean. If not provided a value, the accumulator function returns the current mean.
	*
	* @private
	* @param {number} [x] - new value
	* @returns {(number|null)} mean value or null
	*/
	function accumulator( x ) {
		if ( arguments.length === 0 ) {
			return ( m === void 0 ) ? null : m;
		}
		if ( m === void 0 ) {
			m = x;
		} else {
			m += alpha * ( x-m );
		}
		return m;
	}
}
Returns an accumulator function which incrementally computes an exponentially weighted mean.

@param {NonNegativeNumber} alpha - smoothing factor
@throws {TypeError} must provide a nonnegative number
@throws {RangeError} must be on the interval `[0,1]`
@returns {Function} accumulator function

@example
var accumulator = increwmean( 0.5 );

var v = accumulator();
// returns null

v = accumulator( 2.0 );
// returns 2.0

v = accumulator( -5.0 );
// returns -1.5

v = accumulator();
// returns -1.5