function baseSlice(array, start, end) {
  var index = -1,
      length = array.length;

  start = start == null ? 0 : (+start || 0);
  if (start < 0) {
    start = -start > length ? 0 : (length + start);
  }
  end = (end === undefined || end > length) ? length : (+end || 0);
  if (end < 0) {
    end += length;
  }
  length = start > end ? 0 : ((end - start) >>> 0);
  start >>>= 0;

  var result = Array(length);
  while (++index < length) {
    result[index] = array[index + start];
  }
  return result;
}
This function is like `binaryIndex` except that it invokes `iteratee` for
`value` and each element of `array` to compute their sort ranking. The
iteratee is invoked with one argument; (value).

@private
@param {Array} array The sorted array to inspect.
@param {*} value The value to evaluate.
@param {Function} iteratee The function invoked per iteration.
@param {boolean} [retHighest] Specify returning the highest qualified index.
@returns {number} Returns the index at which `value` should be inserted
 into `array`.