function factory( x ) {
	var get;
	var len;
	var dt;

	if ( !isCollection( x ) ) {
		throw new TypeError( format( 'invalid argument. Must provide an array-like object. Value: `%s`.', x ) );
	}
	// Resolve the input array data type:
	dt = dtype( x );

	// Resolve an accessor for retrieving input array elements:
	if ( isAccessorArray( x ) ) {
		get = accessorGetter( dt );
	}
	// Get the number of elements over which to iterate:
	len = x.length;

	return ( get === void 0 ) ? contains : accessors;
	/**
	* Tests if an array contains a provided search value.
	*
	* @private
	* @param {*} value - search value
	* @returns {boolean} boolean indicating if an array contains a search value
	*
	* @example
	* var out = contains( [ 1, 2, 3 ], 2 );
	* // returns true
	*/
	function contains( value ) {
		var i;
		for ( i = 0; i < len; i++ ) {
			if ( x[ i ] === value ) {
				return true;
			}
		}
		return false;
	}
	/**
	* Tests if an array contains a provided search value.
	*
	* @private
	* @param {*} value - search value
	* @returns {boolean} boolean indicating if an array contains a search value
	*/
	function accessors( value ) {
		var i;
		for ( i = 0; i < len; i++ ) {
			if ( get( x, i ) === value ) {
				return true;
			}
		}
		return false;
	}
}
Returns a function to tests if an array contains a provided search value.

@param {Collection} x - input array
@throws {TypeError} must provide an array-like object
@returns {Function} function to test if an array contains a search value

@example
var contains = factory( [ 1, 2, 3 ] );
// returns <Function>

var bool = contains( 2 );
// returns true