function removeIf(arr, f, opt_obj) {
  const i = findIndex(arr, f, opt_obj);
  if (i >= 0) {
    removeAt(arr, i);
    return true;
  }
  return false;
}
Removes the first value that satisfies the given condition.
@param {IArrayLike<T>} arr Array or array
    like object over which to iterate.
@param {?function(this:S, T, number, ?) : boolean} f The function to call
    for every element. This function
    takes 3 arguments (the element, the index and the array) and should
    return a boolean.
@param {S=} opt_obj An optional "this" context for the function.
@return {boolean} True if an element was removed.
@template T,S