function accumulator( x ) {
		if ( arguments.length === 0 ) {
			if ( N === 0 ) {
				return null;
			}
			meanstdev[ 0 ] = mu; // Why? Because we cannot guarantee someone hasn't mutated the output array
			if ( N === 1 ) {
				if ( isnan( M2 ) ) {
					meanstdev[ 1 ] = NaN;
				} else {
					meanstdev[ 1 ] = 0.0;
				}
				return meanstdev;
			}
			meanstdev[ 1 ] = sqrt( M2/(N-1) );
			return meanstdev;
		}
		N += 1;
		delta = x - mu;
		mu += delta / N;
		M2 += delta * ( x - mu );

		meanstdev[ 0 ] = mu;
		if ( N < 2 ) {
			if ( isnan( M2 ) ) {
				meanstdev[ 1 ] = NaN;
			} else {
				meanstdev[ 1 ] = 0.0;
			}
			return meanstdev;
		}
		meanstdev[ 1 ] = sqrt( M2/(N-1) );
		return meanstdev;
	}
If provided a value, the accumulator function returns updated results. If not provided a value, the accumulator function returns the current results.

@private
@param {number} [x] - input value
@returns {(ArrayLikeObject|null)} output array or null