module.exports=_curry2(functioninvoker(arity,method){returncurryN(arity+1,function(){vartarget=arguments[arity];if(target!=null&&_isFunction(target[method])){returntarget[method].apply(target,Array.prototype.slice.call(arguments,0,arity));}thrownewTypeError(toString(target)+' does not have a method named "'+method+'"');});});
/**
* Removes all elements from `array` that `predicate` returns truthy for
* and returns an array of the removed elements. The predicate is invoked
* with three arguments: (value, index, array).
*
* **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
* to pull elements from an array by value.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new array of removed elements.
* @example
*
* var array = [1, 2, 3, 4];
* var evens = _.remove(array, function(n) {
* return n % 2 == 0;
* });
*
* console.log(array);
* // => [1, 3]
*
* console.log(evens);
* // => [2, 4]
*/functionremove(array,predicate){varresult=[];if(!(array&&array.length)){returnresult;}varindex=-1,indexes=[],length=array.length;predicate=getIteratee(predicate,3);while(++index<length){varvalue=array[index];if(predicate(value,index,array)){result.push(value);indexes.push(index);}}basePullAt(array,indexes);returnresult;}
/**
* The base implementation of `_.pullAt` without support for individual
* indexes or capturing the removed elements.
*
* @private
* @param {Array} array The array to modify.
* @param {number[]} indexes The indexes of elements to remove.
* @returns {Array} Returns `array`.
*/functionbasePullAt(array,indexes){varlength=array?indexes.length:0,lastIndex=length-1;while(length--){varindex=indexes[length];if(length==lastIndex||index!==previous){varprevious=index;if(isIndex(index)){splice.call(array,index,1);}else{baseUnset(array,index);}}}returnarray;}
/**
* The base implementation of `unset`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The property path to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
*/functionbaseUnset(object,path){path=castPath(path,object)object=parent(object,path)returnobject==null||deleteobject[toKey(last(path))]}exportdefaultbaseUnset
/**
* Removes the sub-list of `list` starting at index `start` and containing
* `count` elements. _Note that this is not destructive_: it returns a copy of
* the list with the changes.
* <small>No lists have been harmed in the application of this function.</small>
*
* @func
* @memberOf R
* @since v0.2.2
* @category List
* @sig Number -> Number -> [a] -> [a]
* @param {Number} start The position to start removing elements
* @param {Number} count The number of elements to remove
* @param {Array} list The list to remove from
* @return {Array} A new Array with `count` elements from `start` removed.
* @example
*
* R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]
*/module.exports=_curry3(functionremove(start,count,list){varresult=Array.prototype.slice.call(list,0);result.splice(start,count);returnresult;});