function pickArguments( fcn, indices, thisArg ) {
	var fcns;
	var idx;
	var v;
	var i;
	if ( !isFunction( fcn ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );
	}
	if ( !isCollection( indices ) ) {
		throw new TypeError( format( 'invalid argument. Second argument must be an array-like object containing nonnegative integers. Value: `%s`.', indices ) );
	}
	idx = [];
	for ( i = 0; i < indices.length; i++ ) {
		v = indices[ i ];
		if ( !isNonNegativeInteger( v ) ) {
			throw new TypeError( format( 'invalid argument. Second argument must be an array-like object containing nonnegative integers. Value: `%s`.', indices ) );
		}
		idx.push( v );
	}
	fcns = [ nullary, unary, binary, ternary, quaternary, quinary ];
	return ( idx.length < fcns.length ) ? fcns[ idx.length ] : nary;

	/**
	* Invokes a nullary function.
	*
	* @private
	* @param {...*} args - arguments
	* @returns {*} return value
	*/
	function nullary() {
		return fcn.call( thisArg );
	}

	/**
	* Invokes a unary function.
	*
	* @private
	* @param {...*} args - arguments
	* @returns {*} return value
	*/
	function unary() {
		return fcn.call( thisArg, arguments[ idx[0] ] );
	}

	/**
	* Invokes a binary function.
	*
	* @private
	* @param {...*} args - arguments
	* @returns {*} return value
	*/
	function binary() {
		return fcn.call( thisArg, arguments[ idx[0] ], arguments[ idx[1] ] );
	}

	/**
	* Invokes a ternary function.
	*
	* @private
	* @param {...*} args - arguments
	* @returns {*} return value
	*/
	function ternary() {
		return fcn.call( thisArg, arguments[ idx[0] ], arguments[ idx[1] ], arguments[ idx[2] ] ); // eslint-disable-line max-len
	}

	/**
	* Invokes a quaternary function.
	*
	* @private
	* @param {...*} args - arguments
	* @returns {*} return value
	*/
	function quaternary() {
		return fcn.call( thisArg, arguments[ idx[0] ], arguments[ idx[1] ], arguments[ idx[2] ], arguments[ idx[3] ] ); // eslint-disable-line max-len
	}

	/**
	* Invokes a quinary function.
	*
	* @private
	* @param {...*} args - arguments
	* @returns {*} return value
	*/
	function quinary() {
		return fcn.call( thisArg, arguments[ idx[0] ], arguments[ idx[1] ], arguments[ idx[2] ], arguments[ idx[3] ], arguments[ idx[4] ] ); // eslint-disable-line max-len
	}

	/**
	* Invokes an n-ary function.
	*
	* @private
	* @param {...*} args - arguments
	* @returns {*} return value
	*/
	function nary() {
		var args;
		var i;

		args = [];
		for ( i = 0; i < arguments.length; i++ ) {
			args.push( arguments[ idx[i] ] );
		}
		return fcn.apply( thisArg, args );
	}
}
Returns a function that applies specified arguments to a provided function.

@param {Function} fcn - input function
@param {NonNegativeIntegerArray} indices - argument indices
@param {*} [thisArg] - function context
@throws {TypeError} first argument must be a function
@throws {TypeError} second argument must be an array of nonnegative integers
@returns {Function} function wrapper

@example
function foo( a, b ) {
    return [ a, b ];
}

var bar = pickArguments( foo, [ 0, 2 ] );

var out = bar( 1, 2, 3 );
// returns [ 1, 3 ]